rustc_data_structures::sharded

Function get_shard_hash

Source
fn get_shard_hash(hash: u64) -> usize
Expand description

Get a shard with a pre-computed hash value. If get_shard_by_value is ever used in combination with get_shard_by_hash on a single Sharded instance, then hash must be computed with FxHasher. Otherwise, hash can be computed with any hasher, so long as that hasher is used consistently for each Sharded instance.