Skip to content

Commit b02e53f

Browse files
committed
Remove check for ZST in RawVec::needs_to_grow
1 parent ad7de67 commit b02e53f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/liballoc/raw_vec.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
461461
/// Returns if the buffer needs to grow to fulfill the needed extra capacity.
462462
/// Mainly used to make inlining reserve-calls possible without inlining `grow`.
463463
fn needs_to_grow(&self, used_capacity: usize, needed_extra_capacity: usize) -> bool {
464-
mem::size_of::<T>() != 0
465-
&& needed_extra_capacity > self.capacity().wrapping_sub(used_capacity)
464+
needed_extra_capacity > self.capacity().wrapping_sub(used_capacity)
466465
}
467466

468467
fn capacity_from_bytes(excess: usize) -> usize {

0 commit comments

Comments
 (0)