We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
modulo_one
1 parent 968be98 commit 0a0968bCopy full SHA for 0a0968b
compiler/rustc_data_structures/src/sharded.rs
@@ -140,6 +140,7 @@ pub fn make_hash<K: Hash + ?Sized>(val: &K) -> u64 {
140
/// `hash` can be computed with any hasher, so long as that hasher is used
141
/// consistently for each `Sharded` instance.
142
#[inline]
143
+#[allow(clippy::modulo_one)]
144
pub fn get_shard_index_by_hash(hash: u64) -> usize {
145
let hash_len = mem::size_of::<usize>();
146
// Ignore the top 7 bits as hashbrown uses these and get the next SHARD_BITS highest bits.
0 commit comments