Fix typo in #569. (#582)

This commit is contained in:
Alexander Sepity 2020-09-26 20:26:19 +03:00 committed by GitHub
parent dd07674b59
commit 85a7f883d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);