Skip to content

Commit

Permalink
add a comment to clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJoJet committed Aug 7, 2022
1 parent 1fe075a commit 255a88c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bevy_ecs/src/schedule/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ impl Labels {
let mut set = IndexSet::default();
let (idx, _) = set.insert_full(val.clone());
let old = type_map.insert(set);
// We already checked that there is no set for type `L`,
// so let's avoid generating useless drop code for the "previous" entry.
std::mem::forget(old);
idx as u64
}
Expand Down

0 comments on commit 255a88c

Please sign in to comment.