From f04d64537baed39ba50af7f0c037eda0f7d9af8d Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 17 Dec 2024 11:17:06 +0100 Subject: [PATCH] Fix `Lookup>` impls --- src/interned.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/interned.rs b/src/interned.rs index ba58b512..6f1c41e1 100644 --- a/src/interned.rs +++ b/src/interned.rs @@ -394,9 +394,7 @@ impl Lookup for &str { impl + Clone + Lookup, T> Lookup> for &[A] { fn hash(&self, h: &mut H) { - for a in *self { - Hash::hash(a, h); - } + Hash::hash(self, h); } fn eq(&self, data: &Vec) -> bool { @@ -410,9 +408,7 @@ impl + Clone + Lookup, T> Lookup> for &[A] impl + Clone + Lookup, T> Lookup> for [A; N] { fn hash(&self, h: &mut H) { - for a in self { - Hash::hash(a, h); - } + Hash::hash(self, h); } fn eq(&self, data: &Vec) -> bool {