about summary refs log tree commit diff
diff options
context:
space:
mode:
authortamaron <tamaron1203@gmail.com>2022-01-30 14:59:25 +0900
committertamaron <tamaron1203@gmail.com>2022-01-30 14:59:25 +0900
commit1a2364e534b75377c9e5727b29dca5017596bb1f (patch)
tree588585771dbdba9672975709fa0b9047692df889
parentba80d45b3ccbae00b55bed1b30ef5839f5d6855e (diff)
downloadrust-1a2364e534b75377c9e5727b29dca5017596bb1f.tar.gz
rust-1a2364e534b75377c9e5727b29dca5017596bb1f.zip
fix code
-rw-r--r--clippy_lints/src/methods/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index 7847adce0f1..5b4a152afd5 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -2404,8 +2404,12 @@ fn check_methods<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, msrv: Optio
             },
             ("unwrap", []) => {
                 match method_call(recv) {
-                    Some(("get", [recv, get_arg], _)) => get_unwrap::check(cx, expr, recv, get_arg, false),
-                    Some(("get_mut", [recv, get_arg], _)) => get_unwrap::check(cx, expr, recv, get_arg, true),
+                    Some(("get", [recv, get_arg], _)) => {
+                        get_unwrap::check(cx, expr, recv, get_arg, false);
+                    },
+                    Some(("get_mut", [recv, get_arg], _)) => {
+                        get_unwrap::check(cx, expr, recv, get_arg, true);
+                    },
                     _ => {},
                 }
                 unwrap_used::check(cx, expr, recv);