We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 415394c commit 0d542b7Copy full SHA for 0d542b7
clippy_lints/src/write.rs
@@ -470,10 +470,7 @@ impl Write {
470
ExprKind::Assign(lhs, rhs, _) => {
471
if_chain! {
472
if let ExprKind::Lit(ref lit) = rhs.kind;
473
- if match lit.kind {
474
- LitKind::Int(_, _) | LitKind::Float(_, _) => false,
475
- _ => true,
476
- };
+ if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..));
477
if let ExprKind::Path(_, p) = &lhs.kind;
478
then {
479
let mut all_simple = true;
0 commit comments