use u64::BITS

This commit is contained in:
Brooks Prumo
2021-09-15 14:53:30 -05:00
committed by Jeff Washington (jwash)
parent 406e43ed3f
commit 67afcfd493

View File

@ -168,7 +168,7 @@ impl<T: Clone + Copy + Debug> BucketMap<T> {
pub fn bucket_ix(&self, key: &Pubkey) -> usize { pub fn bucket_ix(&self, key: &Pubkey) -> usize {
if self.num_buckets_pow2 > 0 { if self.num_buckets_pow2 > 0 {
let location = read_be_u64(key.as_ref()); let location = read_be_u64(key.as_ref());
(location >> (64 - self.num_buckets_pow2)) as usize (location >> (u64::BITS - self.num_buckets_pow2 as u32)) as usize
} else { } else {
0 0
} }