Callbacks::draw() must not mutate the state

这个提交包含在:
Astro 2020-03-04 18:34:02 +01:00
父节点 0effe28bfa
当前提交 6eb7c31406
共有 2 个文件被更改,包括 2 次插入2 次删除

查看文件

@ -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) {}
}

查看文件

@ -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);
}