One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
e7540d2833
commit
8ba2f77148
138 changed files with 1328 additions and 1366 deletions
|
@ -10,15 +10,15 @@ impl CharBag {
|
|||
|
||||
fn insert(&mut self, c: char) {
|
||||
let c = c.to_ascii_lowercase();
|
||||
if c >= 'a' && c <= 'z' {
|
||||
if ('a'..='z').contains(&c) {
|
||||
let mut count = self.0;
|
||||
let idx = c as u8 - 'a' as u8;
|
||||
count = count >> (idx * 2);
|
||||
let idx = c as u8 - b'a';
|
||||
count >>= idx * 2;
|
||||
count = ((count << 1) | 1) & 3;
|
||||
count = count << idx * 2;
|
||||
count <<= idx * 2;
|
||||
self.0 |= count;
|
||||
} else if c >= '0' && c <= '9' {
|
||||
let idx = c as u8 - '0' as u8;
|
||||
} else if ('0'..='9').contains(&c) {
|
||||
let idx = c as u8 - b'0';
|
||||
self.0 |= 1 << (idx + 52);
|
||||
} else if c == '-' {
|
||||
self.0 |= 1 << 62;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue