diff options
| author | bcoopers <coopersmithbrian@gmail.com> | 2015-03-29 16:12:01 -0400 |
|---|---|---|
| committer | bcoopers <coopersmithbrian@gmail.com> | 2015-03-29 16:12:01 -0400 |
| commit | 1caf260edb561f8fa20f5df021a4bfdf9d64195f (patch) | |
| tree | 4da6778ad87a921e628101a34d3c842926b8e81d | |
| parent | c93760da9dbe0c3117c678c977d48cd56a356f8d (diff) | |
| download | rust-1caf260edb561f8fa20f5df021a4bfdf9d64195f.tar.gz rust-1caf260edb561f8fa20f5df021a4bfdf9d64195f.zip | |
change std::usize to usize
| -rw-r--r-- | src/libcollections/vec.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 51ad64331e2..6a6d55772f7 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -642,10 +642,10 @@ impl<T> Vec<T> { #[inline(never)] fn resize<T>(vec: &mut Vec<T>) { let old_size = vec.cap * mem::size_of::<T>(); - if old_size == std::usize::MAX { panic!("capacity overflow") } + if old_size == usize::MAX { panic!("capacity overflow") } let mut size = max(old_size, 2 * mem::size_of::<T>()) * 2; if old_size > size { - size = std::usize::MAX; + size = usize::MAX; } unsafe { let ptr = alloc_or_realloc(*vec.ptr, old_size, size); |
