Use pointer eq/hash for SourceIdInner

This commit is contained in:
Dale Wijnand 2018-11-26 17:32:27 +00:00
parent a73c5171f8
commit ea87ca3e98
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF

View File

@ -337,11 +337,11 @@ impl SourceId {
}
pub fn full_eq(&self, other: &SourceId) -> bool {
self.inner == other.inner
ptr::eq(self.inner, other.inner)
}
pub fn full_hash<S: hash::Hasher>(&self, into: &mut S) {
self.inner.hash(into)
(self.inner as *const SourceIdInner).hash(into)
}
}