diff options
Diffstat (limited to 'crates/ra_analysis')
-rw-r--r-- | crates/ra_analysis/src/db/input.rs | 15 |
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 @@ | |||
1 | use std::{ | 1 | use std::{ |
2 | sync::Arc, | 2 | sync::Arc, |
3 | hash::{Hasher, Hash}, | ||
4 | }; | 3 | }; |
5 | 4 | ||
6 | use salsa; | 5 | use 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)] |
41 | pub(crate) struct SourceRootId(pub(crate) u32); | 40 | pub(crate) struct SourceRootId(pub(crate) u32); |
42 | 41 | ||
43 | #[derive(Clone, Default, Debug, Eq)] | 42 | #[derive(Clone, Default, Debug, PartialEq, Eq)] |
44 | pub(crate) struct SourceRoot { | 43 | pub(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 | ||
49 | impl PartialEq for SourceRoot { | ||
50 | fn eq(&self, other: &SourceRoot) -> bool { | ||
51 | self.file_resolver == other.file_resolver | ||
52 | } | ||
53 | } | ||
54 | |||
55 | impl Hash for SourceRoot { | ||
56 | fn hash<H: Hasher>(&self, hasher: &mut H) { | ||
57 | self.file_resolver.hash(hasher); | ||
58 | } | ||
59 | } | ||
60 | |||
61 | pub(crate) const WORKSPACE: SourceRootId = SourceRootId(0); | 48 | pub(crate) const WORKSPACE: SourceRootId = SourceRootId(0); |