From a2d606f49c9a140dd38dbd1c6456d28144ed2705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Mon, 6 Apr 2020 01:36:21 +0200 Subject: [PATCH] Use isize::MAX directly on type instead of module --- src/vec-alloc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vec-alloc.md b/src/vec-alloc.md index 694059d..b19de4a 100644 --- a/src/vec-alloc.md +++ b/src/vec-alloc.md @@ -182,7 +182,7 @@ fn grow(&mut self) { // we need to make. We lose the ability to allocate e.g. 2/3rds of // the address space with a single Vec of i16's on 32-bit though. // Alas, poor Yorick -- I knew him, Horatio. - assert!(old_num_bytes <= (::std::isize::MAX as usize) / 2, + assert!(old_num_bytes <= (isize::MAX as usize) / 2, "capacity overflow"); let new_num_bytes = old_num_bytes * 2;