Silence clippy::derive_hash_xor_eq

Manually implement PartialEq
This commit is contained in:
Alan Du 2018-10-17 19:15:22 -04:00
parent 4e8ea94e2b
commit 2268a2f8c6

View File

@ -76,12 +76,18 @@ fn file_set(key: ()) -> Arc<FileSet> {
}
}
#[derive(Default, Debug, PartialEq, Eq)]
#[derive(Default, Debug, Eq)]
pub(crate) struct FileSet {
pub(crate) files: FxHashSet<FileId>,
pub(crate) resolver: FileResolverImp,
}
impl PartialEq for FileSet {
fn eq(&self, other: &FileSet) -> bool {
self.files == other.files && self.resolver == other.resolver
}
}
impl Hash for FileSet {
fn hash<H: Hasher>(&self, hasher: &mut H) {
let mut files = self.files.iter().cloned().collect::<Vec<_>>();