Skip to content

Commit 3987c83

Browse files
committed
Auto merge of rust-lang#13919 - danieleades:derive-hash, r=lnicola
derive 'Hash'
2 parents c3b78f4 + 56ffe63 commit 3987c83

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

crates/base-db/src/input.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,10 @@ pub struct CrateGraph {
8484
arena: NoHashHashMap<CrateId, CrateData>,
8585
}
8686

87-
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
87+
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8888
pub struct CrateId(pub u32);
8989

9090
impl stdx::hash::NoHashHashable for CrateId {}
91-
impl std::hash::Hash for CrateId {
92-
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
93-
self.0.hash(state);
94-
}
95-
}
9691

9792
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
9893
pub struct CrateName(SmolStr);

0 commit comments

Comments
 (0)