-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Hi, I've got the following code:
if t1 > t2 {
if value >= t1 { ValueCheck::Correct }
else if value >= t2 { ValueCheck::Warning }
else { ValueCheck::Error }
} else {
if value <= t1 { ValueCheck::Correct }
else if value <= t2 { ValueCheck::Warning }
else { ValueCheck::Error }
}Clippy tells me:
warning: this `else { if .. }` block can be collapsed
--> monitor.rs:328:16
|
328 | } else {
| ________________^
329 | | if value <= t1 { ValueCheck::Correct }
330 | | else if value <= t2 { ValueCheck::Warning }
331 | | else { ValueCheck::Error }
332 | | }
| |_________^
I believe this should not happen.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy