-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-lintArea: New lintsArea: New lintsL-complexityLint: Belongs in the complexity lint groupLint: Belongs in the complexity lint groupL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Any multiple patterns with the wildcard pattern can be removed as the wildcard will match anyway
match "foo" {
"a" => {
dbg!("matched a");
}
"bar" | _ => {
dbg!("bar or wildcat");
}
}Should be written as
match "foo" {
"a" => {
dbg!("matched a");
}
_ => {
dbg!("matched (bar or) wildcard");
}
}cc #1272
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsL-complexityLint: Belongs in the complexity lint groupLint: Belongs in the complexity lint groupL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy