]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/methods/option_map_or_none.rs
Auto merge of #99422 - Dylan-DPC:rollup-htjofm6, r=Dylan-DPC
[rust.git] / src / tools / clippy / clippy_lints / src / methods / option_map_or_none.rs
index 2d71bd6f240fc14bd9ccced4d3f2162d749b1635..5a39b82b027d1643536ec0c4f2fd9237fad57ccf 100644 (file)
@@ -71,7 +71,7 @@ pub(super) fn check<'tcx>(
     if is_option {
         let self_snippet = snippet(cx, recv.span, "..");
         if_chain! {
-            if let hir::ExprKind::Closure { body, fn_decl_span, .. } = map_arg.kind;
+            if let hir::ExprKind::Closure(&hir::Closure { body, fn_decl_span, .. }) = map_arg.kind;
             let arg_snippet = snippet(cx, fn_decl_span, "..");
             let body = cx.tcx.hir().body(body);
             if let Some((func, [arg_char])) = reduce_unit_expression(&body.value);