mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
derive 'Hash'
This commit is contained in:
parent
368e0bb32f
commit
56ffe63c3c
1 changed files with 1 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue