mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
use BITS constant
This commit is contained in:
parent
236c0cf103
commit
1438207c3d
@ -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.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user