From 0d542b7310294a32023e935916a4d8c8f47ec1a8 Mon Sep 17 00:00:00 2001 From: pro-grammer1 <1df0d0d3-eed4-45fc-bc60-43a85079f3f9@anonaddy.me> Date: Sun, 17 Jan 2021 08:48:37 +0000 Subject: [PATCH] Run tests/ui/update-all-references.sh and refactor match into matches! --- clippy_lints/src/write.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs index 78d23e1e0ef..52118a56bb6 100644 --- a/clippy_lints/src/write.rs +++ b/clippy_lints/src/write.rs @@ -470,10 +470,7 @@ fn check_tts<'a>(&self, cx: &EarlyContext<'a>, tts: TokenStream, is_write: bool) ExprKind::Assign(lhs, rhs, _) => { if_chain! { if let ExprKind::Lit(ref lit) = rhs.kind; - if match lit.kind { - LitKind::Int(_, _) | LitKind::Float(_, _) => false, - _ => true, - }; + if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..)); if let ExprKind::Path(_, p) = &lhs.kind; then { let mut all_simple = true; -- 2.44.0