From 20548eba6ceda0563b399f54b06d05b71950aa5c Mon Sep 17 00:00:00 2001 From: avborhanian Date: Thu, 8 Jun 2023 00:38:18 -0700 Subject: [PATCH] Swapping to matches macro. --- clippy_lints/src/arc_with_non_send_sync.rs | 5 +---- 1 file changed, 1 insertion(+), 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()