diff options
| author | The8472 <git@infinite-source.de> | 2021-01-31 21:13:04 +0100 |
|---|---|---|
| committer | The8472 <git@infinite-source.de> | 2021-03-21 20:41:01 +0100 |
| commit | 1438207c3d150ce42804e857537b12082c68c79b (patch) | |
| tree | eb41473797200bb6ecfdaf29751418ebd932921a /library/alloc/src | |
| parent | 236c0cf103aa485db1748587ad87213943bcfb33 (diff) | |
| download | rust-1438207c3d150ce42804e857537b12082c68c79b.tar.gz rust-1438207c3d150ce42804e857537b12082c68c79b.zip | |
use BITS constant
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/vec_deque/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 7a0de74eb23..d3e70991ad5 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -58,7 +58,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>() * 8 - 1); // Largest possible power of two +const MAXIMUM_ZST_CAPACITY: usize = 1 << (usize::BITS - 1); // Largest possible power of two /// A double-ended queue implemented with a growable ring buffer. /// |
