From 426890e8567e5c08f21ee9062c629b0a2a33b130 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Sat, 7 Oct 2023 20:26:10 +0100 Subject: [PATCH] Don't manually implement hash_one --- agb-hashmap/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agb-hashmap/src/lib.rs b/agb-hashmap/src/lib.rs index a4d6cb08..6044c6cb 100644 --- a/agb-hashmap/src/lib.rs +++ b/agb-hashmap/src/lib.rs @@ -470,9 +470,7 @@ where K: Borrow, Q: Hash + ?Sized, { - let mut hasher = self.hasher.build_hasher(); - key.hash(&mut hasher); - let result = hasher.finish(); + let result = self.hasher.hash_one(key); // we want to allow truncation here since we're reducing 64 bits to 32 #[allow(clippy::cast_possible_truncation)]