Skip to content

Commit

Permalink
simplify an expression
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJoJet committed Aug 7, 2022
1 parent d7716b0 commit 1fe075a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/bevy_ecs/src/schedule/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ impl Labels {
/// Gets a reference to the label with specified index.
pub fn get<L: 'static>(&self, key: u64) -> Option<LabelGuard<L>> {
RwLockReadGuard::try_map(self.0.read(), |type_map| {
let set = type_map.get::<IndexSet<L>>()?;
set.get_index(key as usize)
type_map.get::<IndexSet<L>>()?.get_index(key as usize)
})
.ok()
}
Expand Down

0 comments on commit 1fe075a

Please sign in to comment.