We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
usize
1 parent 7e8893d commit 984a06eCopy full SHA for 984a06e
map.rs
@@ -33,7 +33,7 @@ const SHIFT: usize = 4;
33
const SIZE: usize = 1 << SHIFT;
34
const MASK: usize = SIZE - 1;
35
// The number of chunks that the key is divided into. Also the maximum depth of the TrieMap.
36
-const MAX_DEPTH: usize = usize::BITS / SHIFT;
+const MAX_DEPTH: usize = usize::BITS as usize / SHIFT;
37
38
/// A map implemented as a radix trie.
39
///
@@ -701,7 +701,7 @@ impl<T> InternalNode<T> {
701
// if this was done via a trait, the key could be generic
702
#[inline]
703
fn chunk(n: usize, idx: usize) -> usize {
704
- let sh = usize::BITS - (SHIFT * (idx + 1));
+ let sh = usize::BITS as usize - (SHIFT * (idx + 1));
705
(n >> sh) & MASK
706
}
707
0 commit comments