aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/db.rs')
-rw-r--r--crates/ra_analysis/src/db.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs
index 042dde1ac..99d40a269 100644
--- a/crates/ra_analysis/src/db.rs
+++ b/crates/ra_analysis/src/db.rs
@@ -76,12 +76,18 @@ salsa::query_group! {
76 } 76 }
77} 77}
78 78
79#[derive(Default, Debug, PartialEq, Eq)] 79#[derive(Default, Debug, Eq)]
80pub(crate) struct FileSet { 80pub(crate) struct FileSet {
81 pub(crate) files: FxHashSet<FileId>, 81 pub(crate) files: FxHashSet<FileId>,
82 pub(crate) resolver: FileResolverImp, 82 pub(crate) resolver: FileResolverImp,
83} 83}
84 84
85impl PartialEq for FileSet {
86 fn eq(&self, other: &FileSet) -> bool {
87 self.files == other.files && self.resolver == other.resolver
88 }
89}
90
85impl Hash for FileSet { 91impl Hash for FileSet {
86 fn hash<H: Hasher>(&self, hasher: &mut H) { 92 fn hash<H: Hasher>(&self, hasher: &mut H) {
87 let mut files = self.files.iter().cloned().collect::<Vec<_>>(); 93 let mut files = self.files.iter().cloned().collect::<Vec<_>>();