We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ref_mut_iter_method_chain
1 parent 453c07b commit 2a19ba8Copy full SHA for 2a19ba8
1 file changed
clippy_lints/src/methods/ref_mut_iter_method_chain.rs
@@ -17,7 +17,8 @@ pub(crate) fn check(cx: &LateContext<'_>, self_arg: &Expr<'_>) {
17
if implements_trait(cx, cx.typeck_results().expr_ty(base_expr).peel_refs(), iter_trait, &[]);
18
then {
19
let snip_expr = match base_expr.kind {
20
- ExprKind::Unary(UnOp::Deref, e) if cx.typeck_results().expr_ty(e).is_ref() && !base_expr.span.from_expansion()
+ ExprKind::Unary(UnOp::Deref, e)
21
+ if cx.typeck_results().expr_ty(e).is_ref() && !base_expr.span.from_expansion()
22
=> e,
23
_ => base_expr,
24
};
0 commit comments