You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Clippy code has a lot of legacy if_chain! macros even though the nightly if let chains is already in use. I would like to remove all if_chain! macro usage, replacing it with the regular if statement, unless of course there is any reason to avoid that?
One thing to note is that cargo fmt still hasn't been decided (see rfc) on how to handle it, and doesn't seem likely to be decided soon. This is not a blocker, as the code can always be reformatted later.
Possible Lint?
P.S. I just realized that this might be a good automated lint because it would be useful to other existing code as well. See #9354
The text was updated successfully, but these errors were encountered:
#[clippy::author] should probably also be updated to produce if let chains instead of if_chain!.
This utility (recommended by the Clippy Book) still produces code that uses if_chain!, so new lint developers are still being steered towards this old style.
Description
Current Clippy code has a lot of legacy
if_chain!
macros even though the nightly if let chains is already in use. I would like to remove allif_chain!
macro usage, replacing it with the regular if statement, unless of course there is any reason to avoid that?One thing to note is that
cargo fmt
still hasn't been decided (see rfc) on how to handle it, and doesn't seem likely to be decided soon. This is not a blocker, as the code can always be reformatted later.Possible Lint?
P.S. I just realized that this might be a good automated lint because it would be useful to other existing code as well. See #9354
The text was updated successfully, but these errors were encountered: