Skip to content

Commit

Permalink
A nicer way to hash a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Nov 26, 2018
1 parent e269936 commit efd03bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/core/source/source_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl SourceId {
}

pub fn full_hash<S: hash::Hasher>(&self, into: &mut S) {
(self.inner as *const SourceIdInner).hash(into)
ptr::NonNull::from(self.inner).hash(into)
}
}

Expand Down

0 comments on commit efd03bd

Please sign in to comment.