about summary refs log tree commit diff
path: root/clippy_lints/src/functions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'clippy_lints/src/functions.rs')
-rw-r--r--clippy_lints/src/functions.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/clippy_lints/src/functions.rs b/clippy_lints/src/functions.rs
index 3f030dd8422..63133a4872a 100644
--- a/clippy_lints/src/functions.rs
+++ b/clippy_lints/src/functions.rs
@@ -645,13 +645,7 @@ fn is_mutated_static(cx: &LateContext<'_>, e: &hir::Expr<'_>) -> bool {
     use hir::ExprKind::{Field, Index, Path};
 
     match e.kind {
-        Path(ref qpath) => {
-            if let Res::Local(_) = qpath_res(cx, qpath, e.hir_id) {
-                false
-            } else {
-                true
-            }
-        },
+        Path(ref qpath) => !matches!(qpath_res(cx, qpath, e.hir_id), Res::Local(_)),
         Field(ref inner, _) | Index(ref inner, _) => is_mutated_static(cx, inner),
         _ => false,
     }