Skip to content

Commit e820a03

Browse files
committed
iterate List by value
1 parent b3a690f commit e820a03

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/needless_pass_by_value.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
111111

112112
let fn_def_id = cx.tcx.hir().local_def_id(hir_id);
113113

114-
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.iter().copied())
114+
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.iter())
115115
.filter(|p| !p.is_global())
116116
.filter_map(|obligation| {
117117
if let ty::PredicateKind::Trait(poly_trait_ref, _) = obligation.predicate.kind() {
@@ -179,7 +179,6 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
179179
.substs
180180
.iter()
181181
.skip(1)
182-
.cloned()
183182
.collect::<Vec<_>>();
184183
implements_trait(cx, ty_empty_region, t.def_id(), ty_params)
185184
})

0 commit comments

Comments
 (0)