diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-22 22:14:38 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-22 22:14:38 +0100 |
commit | 27694abd9473c53cee4549dfe5ef5d28d0c01bed (patch) | |
tree | 6f51587dc28fc8fe28c0971a810541421ea2d829 /crates/ra_analysis/src/db.rs | |
parent | 5a64b9a811554473e65db7e7ae515079ca48c70b (diff) | |
parent | dc9ce8ff7494f641c7102785cdef95489f2fc3d6 (diff) |
Merge #138
138: Fix some clippy lints r=matklad a=alanhdu
I went ahead and fixed all the clippy lints (there were a couple I thought would be better unfixed and added `cfg` statements to allow them) and also re-enabled clippy and rustfmt in CI.
They were disabled with `no time to explain, disable clippy checks`, so hopefully this won't go against whatever the reason at the time was :laughing:.
One question about the CI though: right now, it's an allowed failure that runs against the latest nightly each time. Would it be better to pin it to a specific nightly (or use the `beta` versions) to lower the churn?
Co-authored-by: Alan Du <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/db.rs')
-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 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)] |
91 | pub(crate) struct FileSet { | 91 | pub(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 | ||
96 | impl PartialEq for FileSet { | ||
97 | fn eq(&self, other: &FileSet) -> bool { | ||
98 | self.files == other.files && self.resolver == other.resolver | ||
99 | } | ||
100 | } | ||
101 | |||
96 | impl Hash for FileSet { | 102 | impl 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<_>>(); |