Callbacks::draw() must not mutate the state

Este commit está contenido en:
Astro 2020-03-04 18:34:02 +01:00
padre 0effe28bfa
commit 6eb7c31406
Se han modificado 2 ficheros con 2 adiciones y 2 borrados

Ver fichero

@ -9,7 +9,7 @@ impl Callbacks for Example {
}
fn handle_event(&mut self, ev: Event) {}
fn update(&mut self) {}
fn draw(&mut self, graphics: &mut Graphics) {}
fn draw(&self, graphics: &mut Graphics) {}
fn clean_up(self) {}
}

Ver fichero

@ -21,7 +21,7 @@ pub trait Callbacks {
}
fn handle_event(&mut self, ev: Event);
fn update(&mut self);
fn draw(&mut self, graphics: &mut Graphics);
fn draw(&self, graphics: &mut Graphics);
fn clean_up(self);
}