From 136bba16312e0ba3031716d2c5715afcfb290590 Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Mon, 30 Sep 2024 19:14:00 +0200 Subject: [PATCH] some cleanup --- hblang/src/son.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hblang/src/son.rs b/hblang/src/son.rs index 2b3ac236..b43bc381 100644 --- a/hblang/src/son.rs +++ b/hblang/src/son.rs @@ -21,7 +21,7 @@ use { convert::identity, fmt::{self, Debug, Display, Write}, format_args as fa, - hash::{Hash as _, Hasher}, + hash::{BuildHasher, Hasher}, mem, ops, }, hashbrown::hash_map, @@ -142,9 +142,7 @@ impl Nodes { hash_map::RawEntryMut<'a, LookupEntry, (), core::hash::BuildHasherDefault>, u64, ) { - let mut hasher = crate::FnvHasher::default(); - node.key().hash(&mut hasher); - let hash = hasher.finish(); + let hash = crate::FnvBuildHasher::default().hash_one(node.key()); let entry = lookup .raw_entry_mut() .from_hash(hash, |n| values[n.nid as usize].as_ref().unwrap().key() == node.key());