Skip to content

Commit 2cafa28

Browse files
committed
oddly this is fasster
1 parent 7a67e88 commit 2cafa28

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/cargo/core/resolver/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl ActivationsKey {
182182

183183
impl std::hash::Hash for ActivationsKey {
184184
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
185-
self.0.fast_hash(state);
185+
self.0.hash(state);
186186
self.1.hash(state);
187187
// self.2.hash(state); // Packages that only differ by SourceId are rare enough to not be worth hashing
188188
}

src/cargo/util/interning.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ impl InternedString {
9090
pub fn as_str(&self) -> &'static str {
9191
self.inner
9292
}
93-
94-
/// A faster implementation of hash that is completely compatible with HashMap,
95-
/// but does not have a stable value between runs of the program.
96-
pub fn fast_hash<H: std::hash::Hasher>(&self, state: &mut H) {
97-
std::ptr::NonNull::from(self.inner).hash(state);
98-
}
9993
}
10094

10195
impl Deref for InternedString {

0 commit comments

Comments
 (0)