diff --git a/crates/bevy_ecs/hecs/src/archetype.rs b/crates/bevy_ecs/hecs/src/archetype.rs index dbccf780e6..b5a9013c2e 100644 --- a/crates/bevy_ecs/hecs/src/archetype.rs +++ b/crates/bevy_ecs/hecs/src/archetype.rs @@ -304,14 +304,14 @@ impl Archetype { new_data.as_ptr().add(new_off), ty.layout.size() * old_count, ); - dealloc( - (*self.data.get()).as_ptr().cast(), - Layout::from_size_align_unchecked( - old_data_size, - self.types.first().map_or(1, |x| x.layout.align()), - ), - ); } + dealloc( + (*self.data.get()).as_ptr().cast(), + Layout::from_size_align_unchecked( + old_data_size, + self.types.first().map_or(1, |x| x.layout.align()), + ), + ); } self.data = UnsafeCell::new(new_data);