Skip to content

Commit 1caf260

Browse files
author
bcoopers
committed
change std::usize to usize
1 parent c93760d commit 1caf260

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcollections/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,10 +642,10 @@ impl<T> Vec<T> {
642642
#[inline(never)]
643643
fn resize<T>(vec: &mut Vec<T>) {
644644
let old_size = vec.cap * mem::size_of::<T>();
645-
if old_size == std::usize::MAX { panic!("capacity overflow") }
645+
if old_size == usize::MAX { panic!("capacity overflow") }
646646
let mut size = max(old_size, 2 * mem::size_of::<T>()) * 2;
647647
if old_size > size {
648-
size = std::usize::MAX;
648+
size = usize::MAX;
649649
}
650650
unsafe {
651651
let ptr = alloc_or_realloc(*vec.ptr, old_size, size);

0 commit comments

Comments
 (0)