Skip to content

Commit 696dc36

Browse files
committed
FIx dogfood
1 parent b36bb0a commit 696dc36

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clippy_lints/src/map_clone.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
7070
},
7171
hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, _, name, None) => match closure_expr.node {
7272
hir::ExprKind::Unary(hir::UnOp::UnDeref, ref inner) => lint(cx, e.span, args[0].span, name, inner),
73-
hir::ExprKind::MethodCall(ref method, _, ref obj) => if method.ident.as_str() == "clone" {
74-
if match_trait_method(cx, closure_expr, &paths::CLONE_TRAIT) {
75-
lint(cx, e.span, args[0].span, name, &obj[0]);
76-
}
73+
hir::ExprKind::MethodCall(ref method, _, ref obj) => if method.ident.as_str() == "clone" && match_trait_method(cx, closure_expr, &paths::CLONE_TRAIT) {
74+
lint(cx, e.span, args[0].span, name, &obj[0]);
7775
}
7876
_ => {},
7977
},

0 commit comments

Comments
 (0)