about summary refs log tree commit diff
path: root/src/librustc_data_structures/stable_hasher.rs
diff options
context:
space:
mode:
authorJesper Steen Møller <jesper@selskabet.org>2019-05-02 20:16:48 +0200
committerJesper Steen Møller <jesper@selskabet.org>2019-05-04 20:29:35 +0200
commit6da7649f61fae784e1df991be5c688026ade3c84 (patch)
tree60c2d9d4b5cc265c5d22a9167a855b7fd9f58004 /src/librustc_data_structures/stable_hasher.rs
parent6802082039285bc07736f8c9900a0410b5c1e7dc (diff)
downloadrust-6da7649f61fae784e1df991be5c688026ade3c84.tar.gz
rust-6da7649f61fae784e1df991be5c688026ade3c84.zip
Delegate SmallVec's stable_hash to array's stable_hash.
Diffstat (limited to 'src/librustc_data_structures/stable_hasher.rs')
-rw-r--r--src/librustc_data_structures/stable_hasher.rs4
1 files changed, 1 insertions, 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<A, CTX> HashStable<CTX> for SmallVec<[A; 1]> where A: HashStable<CTX> {
     fn hash_stable<W: StableHasherResult>(&self,
                                           ctx: &mut CTX,
                                           hasher: &mut StableHasher<W>) {
-        for item in self {
-            item.hash_stable(ctx, hasher);
-        }
+        (&self[..]).hash_stable(ctx, hasher);
     }
 }