diff --git a/crates/bevy_ecs/src/schedule/label.rs b/crates/bevy_ecs/src/schedule/label.rs index f1e5a7ee438754..ac6b144e5b6f71 100644 --- a/crates/bevy_ecs/src/schedule/label.rs +++ b/crates/bevy_ecs/src/schedule/label.rs @@ -187,8 +187,7 @@ impl Labels { /// Gets a reference to the label with specified index. pub fn get(&self, key: u64) -> Option> { RwLockReadGuard::try_map(self.0.read(), |type_map| { - let set = type_map.get::>()?; - set.get_index(key as usize) + type_map.get::>()?.get_index(key as usize) }) .ok() }