Skip to content

Commit 8931da4

Browse files
committed
use propagate_through_exprs instead of propagate_through_expr
fix `ExprKind` static_assert_size fix hir-stats
1 parent 097ef51 commit 8931da4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

clippy_lints/src/eta_reduction.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,8 @@ fn check_inputs(
206206
_ => false,
207207
}
208208
};
209-
if let Some(receiver) = receiver {
210-
std::iter::zip(params, std::iter::once(receiver).chain(call_args.iter()))
211-
.all(|(param, arg)| check_inputs(param, arg))
212-
} else {
213-
std::iter::zip(params, call_args).all(|(param, arg)| check_inputs(param, arg))
214-
}
209+
std::iter::zip(params, receiver.into_iter().chain(call_args.iter()))
210+
.all(|(param, arg)| check_inputs(param, arg))
215211
}
216212

217213
fn check_sig<'tcx>(cx: &LateContext<'tcx>, closure_ty: Ty<'tcx>, call_ty: Ty<'tcx>) -> bool {

0 commit comments

Comments
 (0)