Make init take an impl Fn rather than a Box<dyn Fn()>

This commit is contained in:
Gwilym Kuiper 2022-02-14 21:56:08 +00:00
parent 3a913f142a
commit de594ad362

View file

@ -482,12 +482,7 @@ impl<'a> InfiniteScrolledMap<'a> {
} }
} }
pub fn init( pub fn init(&mut self, vram: &mut VRamManager, pos: Vector2D<i32>, between_updates: impl Fn()) {
&mut self,
vram: &mut VRamManager,
pos: Vector2D<i32>,
between_updates: Box<dyn Fn()>,
) {
while self.init_partial(vram, pos) != PartialUpdateStatus::Done { while self.init_partial(vram, pos) != PartialUpdateStatus::Done {
between_updates(); between_updates();
} }