Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2af642d

Browse files
committed
Replace another instance of match with matches
1 parent 0d542b7 commit 2af642d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

clippy_lints/src/write.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,7 @@ impl Write {
443443
return (Some(fmtstr), None);
444444
};
445445
match &token_expr.kind {
446-
ExprKind::Lit(lit)
447-
if match lit.kind {
448-
LitKind::Int(_, _) | LitKind::Float(_, _) => false,
449-
_ => true,
450-
} =>
451-
{
446+
ExprKind::Lit(lit) if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..)) => {
452447
let mut all_simple = true;
453448
let mut seen = false;
454449
for arg in &args {

0 commit comments

Comments
 (0)