From 6da7649f61fae784e1df991be5c688026ade3c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Steen=20M=C3=B8ller?= Date: Thu, 2 May 2019 20:16:48 +0200 Subject: [PATCH] Delegate SmallVec's stable_hash to array's stable_hash. --- src/librustc_data_structures/stable_hasher.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs index c777f1fa829..fa573907d4c 100644 --- a/src/librustc_data_structures/stable_hasher.rs +++ b/src/librustc_data_structures/stable_hasher.rs @@ -324,9 +324,7 @@ impl HashStable for SmallVec<[A; 1]> where A: HashStable { fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { - for item in self { - item.hash_stable(ctx, hasher); - } + (&self[..]).hash_stable(ctx, hasher); } }