Remove check for ZST in `RawVec::needs_to_grow`

This commit is contained in:
Tim Diekmann 2020-03-25 18:46:01 +01:00
parent ad7de67a32
commit b02e53f197
1 changed files with 1 additions and 2 deletions

View File

@ -461,8 +461,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
/// Returns if the buffer needs to grow to fulfill the needed extra capacity.
/// Mainly used to make inlining reserve-calls possible without inlining `grow`.
fn needs_to_grow(&self, used_capacity: usize, needed_extra_capacity: usize) -> bool {
mem::size_of::<T>() != 0
&& needed_extra_capacity > self.capacity().wrapping_sub(used_capacity)
needed_extra_capacity > self.capacity().wrapping_sub(used_capacity)
}
fn capacity_from_bytes(excess: usize) -> usize {