Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4ba1a19

Browse files
committed
fix clippy::into_iter_on_ref: use .iter() instead of into_iter() on references.
1 parent ea9ccfa commit 4ba1a19

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_traits/chalk/db.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
141141

142142
let predicates = self.tcx.predicates_of(adt_def.did).predicates;
143143
let where_clauses: Vec<_> = predicates
144-
.into_iter()
144+
.iter()
145145
.map(|(wc, _)| wc.subst(self.tcx, bound_vars))
146146
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner))
147147
.collect();
@@ -187,7 +187,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
187187

188188
let predicates = self.tcx.predicates_defined_on(def_id).predicates;
189189
let where_clauses: Vec<_> = predicates
190-
.into_iter()
190+
.iter()
191191
.map(|(wc, _)| wc.subst(self.tcx, &bound_vars))
192192
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner)).collect();
193193

src/librustc_ty/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ fn opaque_type_projection_predicates(
443443

444444
let bounds = tcx.predicates_of(def_id);
445445
let predicates =
446-
util::elaborate_predicates(tcx, bounds.predicates.into_iter().map(|&(pred, _)| pred));
446+
util::elaborate_predicates(tcx, bounds.predicates.iter().map(|&(pred, _)| pred));
447447

448448
let filtered_predicates = predicates.filter_map(|obligation| {
449449
let pred = obligation.predicate;

0 commit comments

Comments
 (0)