Remove Layer trait and simplify Canvas

This commit is contained in:
Héctor Ramón Jiménez 2020-04-19 21:55:23 +02:00
parent bb424e54c5
commit 592cc68506
9 changed files with 181 additions and 174 deletions

View file

@ -1,16 +0,0 @@
use crate::canvas::{Event, Layer, Size};
pub trait Program {
type Input;
fn layers<'a>(&'a self, input: &'a Self::Input)
-> Vec<Box<dyn Layer + 'a>>;
fn update<'a>(
&'a mut self,
_event: Event,
_bounds: Size,
_input: &'a Self::Input,
) {
}
}