Skip to content

Commit

Permalink
Merge branch 'cholcombe973-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
agerasev committed Sep 26, 2024
2 parents 9cf82af + 33f9798 commit 9e0d3e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl<T> From<Vec<MaybeUninit<T>>> for Heap<T> {
// Convert `value` to boxed slice of length equals to `value.capacity()`
// except for zero-sized types - for them length will be `value.len()` because `Vec::capacity` for ZST is undefined
// (see <https://doc.rust-lang.org/std/vec/struct.Vec.html#guarantees>).
if size_of::<T>() != 0 {
if core::mem::size_of::<T>() != 0 {
unsafe { value.set_len(value.capacity()) };
}
Self::from(value.into_boxed_slice())
Expand Down

0 comments on commit 9e0d3e6

Please sign in to comment.