diff options
| author | tamaron <tamaron1203@gmail.com> | 2022-01-30 14:59:25 +0900 |
|---|---|---|
| committer | tamaron <tamaron1203@gmail.com> | 2022-01-30 14:59:25 +0900 |
| commit | 1a2364e534b75377c9e5727b29dca5017596bb1f (patch) | |
| tree | 588585771dbdba9672975709fa0b9047692df889 | |
| parent | ba80d45b3ccbae00b55bed1b30ef5839f5d6855e (diff) | |
| download | rust-1a2364e534b75377c9e5727b29dca5017596bb1f.tar.gz rust-1a2364e534b75377c9e5727b29dca5017596bb1f.zip | |
fix code
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 8 |
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); |
