diff options
| author | togami2864 <tuabobo123@gmail.com> | 2021-11-16 23:07:19 +0900 |
|---|---|---|
| committer | togami2864 <tuabobo123@gmail.com> | 2021-11-16 23:07:19 +0900 |
| commit | 7605bac2cb72627e29d0a82a70d5496a5a7a1827 (patch) | |
| tree | a145577df8f19519a359f6e3e9cdb497c4bb8793 | |
| parent | 0a30fdcd3c5ab9803983671a4452dff7e31f9e80 (diff) | |
| download | rust-7605bac2cb72627e29d0a82a70d5496a5a7a1827.tar.gz rust-7605bac2cb72627e29d0a82a70d5496a5a7a1827.zip | |
resolve CI
| -rw-r--r-- | clippy_lints/src/methods/option_map_or_none.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/methods/option_map_or_none.rs b/clippy_lints/src/methods/option_map_or_none.rs index 12ccaa24c3b..b5652838892 100644 --- a/clippy_lints/src/methods/option_map_or_none.rs +++ b/clippy_lints/src/methods/option_map_or_none.rs @@ -72,10 +72,10 @@ pub(super) fn check<'tcx>( if is_option { let self_snippet = snippet(cx, recv.span, ".."); - if let hir::ExprKind::Closure(_, _, id, span, _) = map_arg.kind { + if_chain! { + if let hir::ExprKind::Closure(_, _, id, span, _) = map_arg.kind; let arg_snippet = snippet(cx, span, ".."); let body = cx.tcx.hir().body(id); - if_chain! { if let Some((func, arg_char)) = reduce_unit_expression(cx, &body.value); if arg_char.len() == 1; if let hir::ExprKind::Path(ref qpath) = func.kind; @@ -95,7 +95,7 @@ pub(super) fn check<'tcx>( Applicability::MachineApplicable, ); } - } + } let func_snippet = snippet(cx, map_arg.span, ".."); |
