forked from AbleOS/holey-bytes
some cleanup
This commit is contained in:
parent
c1b00b6d6b
commit
136bba1631
|
@ -21,7 +21,7 @@ use {
|
||||||
convert::identity,
|
convert::identity,
|
||||||
fmt::{self, Debug, Display, Write},
|
fmt::{self, Debug, Display, Write},
|
||||||
format_args as fa,
|
format_args as fa,
|
||||||
hash::{Hash as _, Hasher},
|
hash::{BuildHasher, Hasher},
|
||||||
mem, ops,
|
mem, ops,
|
||||||
},
|
},
|
||||||
hashbrown::hash_map,
|
hashbrown::hash_map,
|
||||||
|
@ -142,9 +142,7 @@ impl Nodes {
|
||||||
hash_map::RawEntryMut<'a, LookupEntry, (), core::hash::BuildHasherDefault<IdentityHasher>>,
|
hash_map::RawEntryMut<'a, LookupEntry, (), core::hash::BuildHasherDefault<IdentityHasher>>,
|
||||||
u64,
|
u64,
|
||||||
) {
|
) {
|
||||||
let mut hasher = crate::FnvHasher::default();
|
let hash = crate::FnvBuildHasher::default().hash_one(node.key());
|
||||||
node.key().hash(&mut hasher);
|
|
||||||
let hash = hasher.finish();
|
|
||||||
let entry = lookup
|
let entry = lookup
|
||||||
.raw_entry_mut()
|
.raw_entry_mut()
|
||||||
.from_hash(hash, |n| values[n.nid as usize].as_ref().unwrap().key() == node.key());
|
.from_hash(hash, |n| values[n.nid as usize].as_ref().unwrap().key() == node.key());
|
||||||
|
|
Loading…
Reference in a new issue