Delegate SmallVec's stable_hash to array's stable_hash.

This commit is contained in:
Jesper Steen Møller 2019-05-02 20:16:48 +02:00
parent 6802082039
commit 6da7649f61

View file

@ -324,9 +324,7 @@ impl<A, CTX> HashStable<CTX> for SmallVec<[A; 1]> where A: HashStable<CTX> {
fn hash_stable<W: StableHasherResult>(&self, fn hash_stable<W: StableHasherResult>(&self,
ctx: &mut CTX, ctx: &mut CTX,
hasher: &mut StableHasher<W>) { hasher: &mut StableHasher<W>) {
for item in self { (&self[..]).hash_stable(ctx, hasher);
item.hash_stable(ctx, hasher);
}
} }
} }