Closed
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)
}