]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/write.rs
Run tests/ui/update-all-references.sh and refactor match into matches!
[rust.git] / clippy_lints / src / write.rs
index 78d23e1e0ef4393838f794259dd4116d7e349519..52118a56bb65d3f83678a83a81506c56ab7a8803 100644 (file)
@@ -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;