Skip to content

Commit

Permalink
Update library/alloc/src/collections/vec_deque.rs
Browse files Browse the repository at this point in the history
Replace lshift with multiply

Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
  • Loading branch information
moonheart08 and m-ou-se committed Sep 8, 2020
1 parent c3c84ad commit e02952c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/collections/vec_deque.rs
Expand Up @@ -33,7 +33,7 @@ mod tests;
const INITIAL_CAPACITY: usize = 7; // 2^3 - 1
const MINIMUM_CAPACITY: usize = 1; // 2 - 1

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

/// A double-ended queue implemented with a growable ring buffer.
///
Expand Down

0 comments on commit e02952c

Please sign in to comment.