Skip to content

Commit 6da7649

Browse files
committed
Delegate SmallVec's stable_hash to array's stable_hash.
1 parent 6802082 commit 6da7649

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_data_structures/stable_hasher.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,7 @@ impl<A, CTX> HashStable<CTX> for SmallVec<[A; 1]> where A: HashStable<CTX> {
324324
fn hash_stable<W: StableHasherResult>(&self,
325325
ctx: &mut CTX,
326326
hasher: &mut StableHasher<W>) {
327-
for item in self {
328-
item.hash_stable(ctx, hasher);
329-
}
327+
(&self[..]).hash_stable(ctx, hasher);
330328
}
331329
}
332330

0 commit comments

Comments
 (0)