Split matches by Jarcho · Pull Request #8400 · rust-lang/rust-clippy · GitHub
source link: https://github.com/rust-lang/rust-clippy/pull/8400
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
All the current lint extractions LGTM. Thanks for splitting this up!
clippy_lints/src/matches/mod.rs
Outdated
match_wild_err_arm::check(cx, ex, arms);
match_wild_enum::check(cx, ex, arms);
match_as_ref::check(cx, ex, arms, expr);
check_wild_in_or_pats(cx, arms);
There are some lints left in mod.rs
. I guess this is because the linting code is too small to extract them into their own file?
I actually missed check_wild_in_or_pats
. It's small enough it doesn't really matter though. The other two I just left because they were in different check functions. Could all be moved out though.
Let's move them all out then. get the mod.rs
file completely cleaned up, while you're at it
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK