diff options
author | Alan Du <[email protected]> | 2018-10-18 00:15:22 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2018-10-18 00:42:23 +0100 |
commit | 2268a2f8c6557301ecdcaeb4074331a0bd37dccd (patch) | |
tree | bf0f63b33fd4ad0fc99ac0893d733303ed6952d6 /crates/ra_analysis/src | |
parent | 4e8ea94e2b72a3e927c8ff1b5f3fe2413ccc79a7 (diff) |
Silence clippy::derive_hash_xor_eq
Manually implement PartialEq
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r-- | crates/ra_analysis/src/db.rs | 8 |
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)] |
80 | pub(crate) struct FileSet { | 80 | pub(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 | ||
85 | impl PartialEq for FileSet { | ||
86 | fn eq(&self, other: &FileSet) -> bool { | ||
87 | self.files == other.files && self.resolver == other.resolver | ||
88 | } | ||
89 | } | ||
90 | |||
85 | impl Hash for FileSet { | 91 | impl 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<_>>(); |