]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/map_clone.rs
Fix clippy build
[rust.git] / clippy_lints / src / map_clone.rs
index 3533de54a1e3d4e140caa0ddcaaba159f0a14d30..95c312f1fe26b19216c0573697d3ca5cca040920 100644 (file)
@@ -67,7 +67,7 @@ fn check_expr(&mut self, cx: &LateContext<'_>, e: &hir::Expr<'_>) {
             if method.ident.name == sym::map;
             let ty = cx.typeck_results().expr_ty(&args[0]);
             if is_type_diagnostic_item(cx, ty, sym::Option) || is_trait_method(cx, e, sym::Iterator);
-            if let hir::ExprKind::Closure { body, .. } = args[1].kind;
+            if let hir::ExprKind::Closure(&hir::Closure { body, .. }) = args[1].kind;
             then {
                 let closure_body = cx.tcx.hir().body(body);
                 let closure_expr = peel_blocks(&closure_body.value);