Implement HashStable for RangeInclusive.

This commit is contained in:
Camille GILLOT 2019-11-16 11:45:57 +01:00
parent 79bde05b45
commit e8e7ad6fb8

View File

@ -429,6 +429,16 @@ impl<T, CTX> HashStable<CTX> for ::std::mem::Discriminant<T> {
}
}
impl<T, CTX> HashStable<CTX> for ::std::ops::RangeInclusive<T>
where T: HashStable<CTX>
{
#[inline]
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
self.start().hash_stable(ctx, hasher);
self.end().hash_stable(ctx, hasher);
}
}
impl<I: vec::Idx, T, CTX> HashStable<CTX> for vec::IndexVec<I, T>
where T: HashStable<CTX>,
{