]> git.proxmox.com Git - cargo.git/commitdiff
Use pointer eq/hash for SourceIdInner
authorDale Wijnand <dale.wijnand@gmail.com>
Mon, 26 Nov 2018 17:32:27 +0000 (17:32 +0000)
committerDale Wijnand <dale.wijnand@gmail.com>
Mon, 26 Nov 2018 17:32:27 +0000 (17:32 +0000)
src/cargo/core/source/source_id.rs

index c65ba4e63cdb8ec7b05bb93aaff0f144989b338f..120816b864a196150a9e8268675480cf019607bb 100644 (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)
     }
 }