Skip to content

Commit efd03bd

Browse files
committed
A nicer way to hash a pointer
1 parent e269936 commit efd03bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/source/source_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl SourceId {
341341
}
342342

343343
pub fn full_hash<S: hash::Hasher>(&self, into: &mut S) {
344-
(self.inner as *const SourceIdInner).hash(into)
344+
ptr::NonNull::from(self.inner).hash(into)
345345
}
346346
}
347347

0 commit comments

Comments
 (0)