-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-lintArea: New lintsArea: New lintsL-styleLint: Belongs in the style lint groupLint: Belongs in the style 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
If one writes
if x < y {
...
} else if x > y {
...
} else {
...
}
one should instead be writing
match x.cmp(&y) {
Ordering::Less => ...,
Ordering::Greater => ...,
Ordering::Equal => ...,
}
matthiaskrgr, Centril, Fogapod, ritwin-n, Zenithsiz and 2 moreJakubGrobelny, sourcefrog, portersrc, abcalphabet, arcin and 7 more
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsL-styleLint: Belongs in the style lint groupLint: Belongs in the style 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