Skip to content

Commit e02952c

Browse files
moonheart08m-ou-se
andauthored
Update library/alloc/src/collections/vec_deque.rs
Replace lshift with multiply Co-authored-by: Mara Bos <[email protected]>
1 parent c3c84ad commit e02952c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/collections/vec_deque.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mod tests;
3333
const INITIAL_CAPACITY: usize = 7; // 2^3 - 1
3434
const MINIMUM_CAPACITY: usize = 1; // 2 - 1
3535

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

3838
/// A double-ended queue implemented with a growable ring buffer.
3939
///

0 commit comments

Comments
 (0)