aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-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);