diff options
| author | Mark Mansi <markm@cs.wisc.edu> | 2019-11-25 18:14:46 -0600 |
|---|---|---|
| committer | Mark Mansi <markm@cs.wisc.edu> | 2019-12-18 20:19:05 -0600 |
| commit | baaf864e07a8b8b99ed548c08606c1c7da74256b (patch) | |
| tree | fc32acc1e229d749129c93f4b794bb316efe5208 /src/liballoc | |
| parent | 3ec3fca414f62cb3172b9324fe7aaa516c71b4e9 (diff) | |
| download | rust-baaf864e07a8b8b99ed548c08606c1c7da74256b.tar.gz rust-baaf864e07a8b8b99ed548c08606c1c7da74256b.zip | |
use usize::MAX instead of !0
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/raw_vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index ce192a7450c..0d6fb259574 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -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] |
