diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index 4f29ee4f75caeb..93217aca5ebf9c 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -1770,9 +1770,9 @@ impl World { f: impl FnOnce(&mut World, &mut Schedule) -> R, ) -> Result { let label = label.as_ref(); - let Some((_, mut schedule)) = self + let Some(mut schedule) = self .get_resource_mut::() - .and_then(|mut s| s.remove_entry(label)) + .and_then(|mut s| s.remove(label)) else { return Err(TryRunScheduleError(label.dyn_clone())); };