Skip to content

Commit 1438207

Browse files
committed
use BITS constant
1 parent 236c0cf commit 1438207

File tree

1 file changed

+1
-1
lines changed
  • library/alloc/src/collections/vec_deque

1 file changed

+1
-1
lines changed

library/alloc/src/collections/vec_deque/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mod tests;
5858
const INITIAL_CAPACITY: usize = 7; // 2^3 - 1
5959
const MINIMUM_CAPACITY: usize = 1; // 2 - 1
6060

61-
const MAXIMUM_ZST_CAPACITY: usize = 1 << (core::mem::size_of::<usize>() * 8 - 1); // Largest possible power of two
61+
const MAXIMUM_ZST_CAPACITY: usize = 1 << (usize::BITS - 1); // Largest possible power of two
6262

6363
/// A double-ended queue implemented with a growable ring buffer.
6464
///

0 commit comments

Comments
 (0)