Relax FnMut
to FnOnce
in app::edit_schedule
(#8982)
# Objective Currently `App::edit_schedule` takes in `impl FnMut(&mut Schedule)`, but it calls the function only once. It is probably the intention has been to have it take `FnOnce` instead. ## Solution - Relax the parameter to take `FnOnce` instead of `FnMut`
This commit is contained in:
parent
9237778e14
commit
ab3b429211
@ -946,7 +946,7 @@ impl App {
|
||||
pub fn edit_schedule(
|
||||
&mut self,
|
||||
label: impl ScheduleLabel,
|
||||
mut f: impl FnMut(&mut Schedule),
|
||||
f: impl FnOnce(&mut Schedule),
|
||||
) -> &mut Self {
|
||||
let mut schedules = self.world.resource_mut::<Schedules>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user