Use only lowercase characters to determine if query matches a candidate
This commit is contained in:
parent
d6ed2ba642
commit
5f2ac61401
2 changed files with 12 additions and 7 deletions
|
@ -9,6 +9,7 @@ impl CharBag {
|
|||
}
|
||||
|
||||
fn insert(&mut self, c: char) {
|
||||
let c = c.to_ascii_lowercase();
|
||||
if c >= 'a' && c <= 'z' {
|
||||
let mut count = self.0;
|
||||
let idx = c as u8 - 'a' as u8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue