Skip to content

Commit ab3b429

Browse files
authored
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`
1 parent 9237778 commit ab3b429

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_app/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ impl App {
946946
pub fn edit_schedule(
947947
&mut self,
948948
label: impl ScheduleLabel,
949-
mut f: impl FnMut(&mut Schedule),
949+
f: impl FnOnce(&mut Schedule),
950950
) -> &mut Self {
951951
let mut schedules = self.world.resource_mut::<Schedules>();
952952

0 commit comments

Comments
 (0)