mirror of
https://github.com/crate-ci/typos.git
synced 2026-11-10 00:03:53 +01:00
Merge pull request #272 from epage/phf1
refactor(varcon): Remove reliance on const-fn
This commit is contained in:
8 files changed
+107770
-113095
No files matched your search
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user