Clippy fixes for new Rust version (#3392)

This commit is contained in:
JT
2021-05-07 07:58:21 +12:00
committed by GitHub
parent 0f8e31af06
commit 91a929b2a9
19 changed files with 109 additions and 158 deletions

View File

@ -377,10 +377,7 @@ impl VarSyntaxShapeDeductor {
.iter()
.map(|decl| {
let usage: VarUsage = decl.into();
let deduction = match deducer.inferences.get(&usage) {
Some(vec) => Some(vec.clone()),
None => None,
};
let deduction = deducer.inferences.get(&usage).cloned();
(decl.clone(), deduction)
})
.collect())
@ -1023,7 +1020,7 @@ impl VarSyntaxShapeDeductor {
Some(combination)
}
})
.filter_map(|elem| elem)
.flatten()
.collect()
}
//No any's intersection of both is result
@ -1044,7 +1041,7 @@ impl VarSyntaxShapeDeductor {
Some(combination)
}
})
.filter_map(|elem| elem)
.flatten()
.collect();
if intersection.is_empty() {
//TODO pass all labels somehow