-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Suggest using let-chains #14678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
#14481 implemented this as an extension to the (It's not on nightly yet though, there's been some issues with the clippy->rust sync so the component has been behind this repo for a few weeks now, but it should be soon) Clippy output for the example snippet
|
@y21 shouldn't the final brace be unindented one level? or is that not really something clippy can do? /genq |
@y21 Cool, feel free to close this issue, or leave it open for tracking. |
The MSRV being for crates targeting 1.85-1.87 on edition 2024 This enables the lint for regular nightly users without the feature gate enabled r? @samueltardieu Fixes #14678 changelog: none
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
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: