aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-25 15:43:17 +0100
committerAleksey Kladov <[email protected]>2018-10-25 15:43:17 +0100
commit5ef3fda5e165cbc079f731e459635df0a714b778 (patch)
treec13e6471924f6f2eabc9cb01575ee78f4923b2a4 /crates/ra_analysis/src
parente7217e1a01e4b2c5b136d8f38f21b5ade0ddcf86 (diff)
Remove unneded Hash
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r--crates/ra_analysis/src/db/input.rs15
1 files changed, 1 insertions, 14 deletions
diff --git a/crates/ra_analysis/src/db/input.rs b/crates/ra_analysis/src/db/input.rs
index 25b9935cb..9baf7474c 100644
--- a/crates/ra_analysis/src/db/input.rs
+++ b/crates/ra_analysis/src/db/input.rs
@@ -1,6 +1,5 @@
1use std::{ 1use std::{
2 sync::Arc, 2 sync::Arc,
3 hash::{Hasher, Hash},
4}; 3};
5 4
6use salsa; 5use salsa;
@@ -40,22 +39,10 @@ salsa::query_group! {
40#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] 39#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
41pub(crate) struct SourceRootId(pub(crate) u32); 40pub(crate) struct SourceRootId(pub(crate) u32);
42 41
43#[derive(Clone, Default, Debug, Eq)] 42#[derive(Clone, Default, Debug, PartialEq, Eq)]
44pub(crate) struct SourceRoot { 43pub(crate) struct SourceRoot {
45 pub(crate) file_resolver: FileResolverImp, 44 pub(crate) file_resolver: FileResolverImp,
46 pub(crate) files: FxHashSet<FileId>, 45 pub(crate) files: FxHashSet<FileId>,
47} 46}
48 47
49impl PartialEq for SourceRoot {
50 fn eq(&self, other: &SourceRoot) -> bool {
51 self.file_resolver == other.file_resolver
52 }
53}
54
55impl Hash for SourceRoot {
56 fn hash<H: Hasher>(&self, hasher: &mut H) {
57 self.file_resolver.hash(hasher);
58 }
59}
60
61pub(crate) const WORKSPACE: SourceRootId = SourceRootId(0); 48pub(crate) const WORKSPACE: SourceRootId = SourceRootId(0);