diff --git a/crates/bevy_ecs/src/schedule/state.rs b/crates/bevy_ecs/src/schedule/state.rs index f30592b55b561..e7b663db8db64 100644 --- a/crates/bevy_ecs/src/schedule/state.rs +++ b/crates/bevy_ecs/src/schedule/state.rs @@ -378,7 +378,7 @@ where } pub fn inactives(&self) -> &[T] { - &self.stack[0..self.stack.len() - 2] + self.stack.split_last().map(|(_, rest)| rest).unwrap() } }