Skip to content

Commit 984a06e

Browse files
committed
add usize casts as fallout from rust-lang/rust#22600
closes #134
1 parent 7e8893d commit 984a06e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const SHIFT: usize = 4;
3333
const SIZE: usize = 1 << SHIFT;
3434
const MASK: usize = SIZE - 1;
3535
// 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;
36+
const MAX_DEPTH: usize = usize::BITS as usize / SHIFT;
3737

3838
/// A map implemented as a radix trie.
3939
///
@@ -701,7 +701,7 @@ impl<T> InternalNode<T> {
701701
// if this was done via a trait, the key could be generic
702702
#[inline]
703703
fn chunk(n: usize, idx: usize) -> usize {
704-
let sh = usize::BITS - (SHIFT * (idx + 1));
704+
let sh = usize::BITS as usize - (SHIFT * (idx + 1));
705705
(n >> sh) & MASK
706706
}
707707

0 commit comments

Comments
 (0)