fix clippy::into_iter_on_ref: use .iter() instead of into_iter() on references.
This commit is contained in:
parent
ea9ccfa42c
commit
4ba1a19463
@ -141,7 +141,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||
|
||||
let predicates = self.tcx.predicates_of(adt_def.did).predicates;
|
||||
let where_clauses: Vec<_> = predicates
|
||||
.into_iter()
|
||||
.iter()
|
||||
.map(|(wc, _)| wc.subst(self.tcx, bound_vars))
|
||||
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner))
|
||||
.collect();
|
||||
@ -187,7 +187,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||
|
||||
let predicates = self.tcx.predicates_defined_on(def_id).predicates;
|
||||
let where_clauses: Vec<_> = predicates
|
||||
.into_iter()
|
||||
.iter()
|
||||
.map(|(wc, _)| wc.subst(self.tcx, &bound_vars))
|
||||
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner)).collect();
|
||||
|
||||
|
@ -443,7 +443,7 @@ fn opaque_type_projection_predicates(
|
||||
|
||||
let bounds = tcx.predicates_of(def_id);
|
||||
let predicates =
|
||||
util::elaborate_predicates(tcx, bounds.predicates.into_iter().map(|&(pred, _)| pred));
|
||||
util::elaborate_predicates(tcx, bounds.predicates.iter().map(|&(pred, _)| pred));
|
||||
|
||||
let filtered_predicates = predicates.filter_map(|obligation| {
|
||||
let pred = obligation.predicate;
|
||||
|
Loading…
Reference in New Issue
Block a user