use usize::MAX instead of !0

This commit is contained in:
Mark Mansi 2019-11-25 18:14:46 -06:00
parent 3ec3fca414
commit baaf864e07

View File

@ -54,7 +54,7 @@ impl<T, A: Alloc> RawVec<T, A> {
pub const fn new_in(a: A) -> Self {
let cap = {
#[cfg(not(bootstrap))]
{ if mem::size_of::<T>() == 0 { !0 } else { 0 } }
{ if mem::size_of::<T>() == 0 { usize::MAX } else { 0 } }
#[cfg(bootstrap)]
[0, !0][(mem::size_of::<T>() == 0) as usize]