mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
apply Ayaz review suggestions
This commit is contained in:
parent
c1d0c24194
commit
ec874655dd
3 changed files with 17 additions and 25 deletions
|
@ -1,9 +1,4 @@
|
|||
use std::{
|
||||
cell::RefCell,
|
||||
hash::{BuildHasher, Hasher},
|
||||
marker::PhantomData,
|
||||
sync::Arc,
|
||||
};
|
||||
use std::{cell::RefCell, hash::BuildHasher, marker::PhantomData, sync::Arc};
|
||||
|
||||
use bumpalo::Bump;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
|
@ -591,12 +586,8 @@ struct LockedGlobalInterner<'a, 'r> {
|
|||
///
|
||||
/// This uses the [default_hasher], so interner maps should also rely on [default_hasher].
|
||||
fn hash<V: std::hash::Hash>(val: V) -> u64 {
|
||||
let mut state = roc_collections::all::BuildHasher::default().build_hasher();
|
||||
val.hash(&mut state);
|
||||
|
||||
// clippy suggests a stylistic improvement but the suggested fix doesn't seem to work out
|
||||
#[allow(clippy::manual_hash_one)]
|
||||
state.finish()
|
||||
let hasher = roc_collections::all::BuildHasher::default();
|
||||
hasher.hash_one(&val)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue