Skip to content

Commit 08aa6a1

Browse files
committed
remove the first world.flush_entities() in despawn
1 parent 0669dd1 commit 08aa6a1

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

crates/bevy_ecs/src/observer/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,7 @@ mod tests {
11761176

11771177
let ent = world.spawn(A).id();
11781178

1179+
let foo = world.entities().reserve_entity();
11791180
// Despawn our entity, which runs the OnRemove observer and allocates a
11801181
// new Entity.
11811182
// Should not panic - if it does, then Entities was not flushed properly

crates/bevy_ecs/src/world/entity_ref.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,6 @@ impl<'w> EntityWorldMut<'w> {
12971297
/// See [`World::despawn`] for more details.
12981298
pub fn despawn(self) {
12991299
let world = self.world;
1300-
world.flush_entities();
13011300
let archetype = &world.archetypes[self.location.archetype_id];
13021301

13031302
// SAFETY: Archetype cannot be mutably aliased by DeferredWorld

0 commit comments

Comments
 (0)