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 09d74b9e7..956cbe162 100644
--- a/crates/ra_analysis/src/db.rs
+++ b/crates/ra_analysis/src/db.rs
@@ -87,12 +87,18 @@ salsa::query_group! {
87 } 87 }
88} 88}
89 89
90#[derive(Default, Debug, PartialEq, Eq)] 90#[derive(Default, Debug, Eq)]
91pub(crate) struct FileSet { 91pub(crate) struct FileSet {
92 pub(crate) files: FxHashSet<FileId>, 92 pub(crate) files: FxHashSet<FileId>,
93 pub(crate) resolver: FileResolverImp, 93 pub(crate) resolver: FileResolverImp,
94} 94}
95 95
96impl PartialEq for FileSet {
97 fn eq(&self, other: &FileSet) -> bool {
98 self.files == other.files && self.resolver == other.resolver
99 }
100}
101
96impl Hash for FileSet { 102impl Hash for FileSet {
97 fn hash<H: Hasher>(&self, hasher: &mut H) { 103 fn hash<H: Hasher>(&self, hasher: &mut H) {
98 let mut files = self.files.iter().cloned().collect::<Vec<_>>(); 104 let mut files = self.files.iter().cloned().collect::<Vec<_>>();