Skip to content

Commit

Permalink
Replace another instance of match with matches
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-grammer1 committed Jan 17, 2021
1 parent 0d542b7 commit 2af642d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions clippy_lints/src/write.rs
Expand Up @@ -443,12 +443,7 @@ impl Write {
return (Some(fmtstr), None);
};
match &token_expr.kind {
ExprKind::Lit(lit)
if match lit.kind {
LitKind::Int(_, _) | LitKind::Float(_, _) => false,
_ => true,
} =>
{
ExprKind::Lit(lit) if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..)) => {
let mut all_simple = true;
let mut seen = false;
for arg in &args {
Expand Down

0 comments on commit 2af642d

Please sign in to comment.