Merge pull request #272 from epage/phf1

refactor(varcon): Remove reliance on const-fn
This commit is contained in:
Ed Page authored and GitHub committed 2021-06-05 11:50:35 -05:00
commit 0aaa2c0d60
8 files changed
+107770 -113095

No files matched your search

+2 -2
View File
@@ -96,8 +96,8 @@ impl BuiltIn {
fn correct_with_vars(&self, word: &str) -> Option<Status<'static>> {
if self.is_vars_enabled() && typos_vars::WORD_RANGE.contains(&word.len()) {
map_lookup(&typos_vars::VARS_DICTIONARY, word)
.map(|variants| self.select_variant(variants))
let word_case = unicase::UniCase::new(word);
typos_vars::find(&word_case).map(|variants| self.select_variant(variants))
} else {
None
}