about summary refs log tree commit diff
diff options
context:
space:
mode:
authoravborhanian <araam@google.com>2023-06-08 00:38:18 -0700
committeravborhanian <araam@google.com>2023-06-08 00:38:18 -0700
commit20548eba6ceda0563b399f54b06d05b71950aa5c (patch)
tree1ddf8dc8099538827a3c2de5234e509e224c5647
parent2f5d1c748a5447256048267d3fbc3533d6d7e126 (diff)
downloadrust-20548eba6ceda0563b399f54b06d05b71950aa5c.tar.gz
rust-20548eba6ceda0563b399f54b06d05b71950aa5c.zip
Swapping to matches macro.
-rw-r--r--clippy_lints/src/arc_with_non_send_sync.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/clippy_lints/src/arc_with_non_send_sync.rs b/clippy_lints/src/arc_with_non_send_sync.rs
index 13e938327bb..a1e44668e1a 100644
--- a/clippy_lints/src/arc_with_non_send_sync.rs
+++ b/clippy_lints/src/arc_with_non_send_sync.rs
@@ -47,10 +47,7 @@ impl LateLintPass<'_> for ArcWithNonSendSync {
             if let ExprKind::Path(func_path) = func.kind;
             if last_path_segment(&func_path).ident.name == sym::new;
             if let arg_ty = cx.typeck_results().expr_ty(arg);
-            if match arg_ty.kind() {
-                ty::Param(_) => false,
-                _ => true,
-            };
+            if !matches!(arg_ty.kind(), ty::Param(_));
             if !cx.tcx
                 .lang_items()
                 .sync_trait()