1
Fork 0

clippy::complexity fixes

This commit is contained in:
Matthias Krüger 2021-10-07 23:18:39 +02:00
parent 0157cc977f
commit e6f77a1787
18 changed files with 23 additions and 30 deletions

View file

@ -892,7 +892,7 @@ impl<'tcx> TypeVisitor<'tcx> for BoundVarsCollector<'tcx> {
match r {
ty::ReLateBound(index, br) if *index == self.binder_index => match br.kind {
ty::BoundRegionKind::BrNamed(def_id, _name) => {
if self.named_parameters.iter().find(|d| **d == def_id).is_none() {
if !self.named_parameters.iter().any(|d| *d == def_id) {
self.named_parameters.push(def_id);
}
}