]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/methods/unnecessary_fold.rs
Auto merge of #99422 - Dylan-DPC:rollup-htjofm6, r=Dylan-DPC
[rust.git] / src / tools / clippy / clippy_lints / src / methods / unnecessary_fold.rs
index 913c4dbedc30113a2d193798954df144ca7d271c..c3531d4d0511e9e8f730dbc64e35190fc2228f53 100644 (file)
@@ -29,7 +29,7 @@ fn check_fold_with_op(
     ) {
         if_chain! {
             // Extract the body of the closure passed to fold
-            if let hir::ExprKind::Closure { body, .. } = acc.kind;
+            if let hir::ExprKind::Closure(&hir::Closure { body, .. }) = acc.kind;
             let closure_body = cx.tcx.hir().body(body);
             let closure_expr = peel_blocks(&closure_body.value);