Fix handling of uppercase characters in fuzzy finding

This commit is contained in:
Max Brunsfeld
2021-04-26 15:04:26 -07:00
parent 870925e2ac
commit e7c594262f
4 changed files with 52 additions and 24 deletions
+10
View File
@@ -1,3 +1,5 @@
use std::iter::FromIterator;
#[derive(Copy, Clone, Debug, Default)]
pub struct CharBag(u64);
@@ -31,6 +33,14 @@ impl Extend<char> for CharBag {
}
}
impl FromIterator<char> for CharBag {
fn from_iter<T: IntoIterator<Item = char>>(iter: T) -> Self {
let mut result = Self::default();
result.extend(iter);
result
}
}
impl From<&str> for CharBag {
fn from(s: &str) -> Self {
let mut bag = Self(0);