]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #9765 - koka831:feat/manual_is_ascii_check, r=xFrednet
authorbors <bors@rust-lang.org>
Tue, 8 Nov 2022 09:20:52 +0000 (09:20 +0000)
committerbors <bors@rust-lang.org>
Tue, 8 Nov 2022 09:20:52 +0000 (09:20 +0000)
Add `manual_is_ascii_check` lint

Addresses https://github.com/rust-lang/rust-clippy/issues/9290

This PR adds new lint `manual_is_ascii_check`, which detects comparison with ascii ranges using `matches!` macros.

As I mentioned as following in the Issue;
> Yes, that's true. we'll start small and then grow it.
> So I'll try to handle matches! macro with single range as suggested above.

However during writing first version, I was thinking that the changes to support alphabetic and digits will be small patch, so I made a single PR in hope review cost can be reduced.

changelog: add new lint [`manual_is_ascii_check`]

r? `@xFrednet`

1  2 
CHANGELOG.md
clippy_lints/src/declared_lints.rs
clippy_lints/src/lib.rs

diff --cc CHANGELOG.md
Simple merge
Simple merge
Simple merge