diff options
| author | Braden Nelson <moonheart08@users.noreply.github.com> | 2020-09-08 13:11:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-08 13:11:08 -0500 |
| commit | e02952c0cc6b360ac914f97da1dfcc46fd82f92c (patch) | |
| tree | fe1e8c4676a0d4a6ea72a4f50082313d2c0b65f7 /library/alloc/src | |
| parent | c3c84ad027941b3011138d38d7797b202812fbb2 (diff) | |
Update library/alloc/src/collections/vec_deque.rs
Replace lshift with multiply Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/vec_deque.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/collections/vec_deque.rs b/library/alloc/src/collections/vec_deque.rs index 664ba48fcf5..f7f488f2f07 100644 --- a/library/alloc/src/collections/vec_deque.rs +++ b/library/alloc/src/collections/vec_deque.rs @@ -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. /// |
