Skip to content

Commit

Permalink
Thank you miri <3
Browse files Browse the repository at this point in the history
  • Loading branch information
cart committed Jan 18, 2025
1 parent 626d35a commit 3799b57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_ecs/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,6 @@ impl<'w> BundleInserter<'w> {
) -> EntityLocation {
let bundle_info = self.bundle_info.as_ref();
let archetype_after_insert = self.archetype_after_insert.as_ref();
let table = self.table.as_mut();
let archetype = self.archetype.as_ref();

// SAFETY: All components in the bundle are guaranteed to exist in the World
Expand All @@ -1069,6 +1068,8 @@ impl<'w> BundleInserter<'w> {
}
}

let table = self.table.as_mut();

// SAFETY: Archetype gets borrowed when running the on_replace observers above,
// so this reference can only be promoted from shared to &mut down here, after they have been ran
let archetype = self.archetype.as_mut();
Expand Down

0 comments on commit 3799b57

Please sign in to comment.