Unnamed repository; edit this file 'description' to name the repository.
derive 'Hash'
Daniel Eades 2023-01-10
parent 368e0bb · commit 56ffe63
-rw-r--r--crates/base-db/src/input.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/base-db/src/input.rs b/crates/base-db/src/input.rs
index 5fa4a80249..b44a157e25 100644
--- a/crates/base-db/src/input.rs
+++ b/crates/base-db/src/input.rs
@@ -84,15 +84,10 @@ pub struct CrateGraph {
arena: NoHashHashMap<CrateId, CrateData>,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CrateId(pub u32);
impl stdx::hash::NoHashHashable for CrateId {}
-impl std::hash::Hash for CrateId {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- self.0.hash(state);
- }
-}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct CrateName(SmolStr);