-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-lintArea: New lintsArea: New lints
Description
What it does
2024 edition introduces let-chains (rust-lang/rust#53667). It would be cool if Clippy could identify places where this feature could be used. Maybe autofix too?
Advantage
- Less nesting
- Less logical complexity
Drawbacks
No response
Example
if let Some(x) = f() {
if g(x) {
dbg!(x)
}
}Could be written as:
if let Some(x) = f() && g(x) {
dbg!(x)
}mi2ebi
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lints