File tree 1 file changed +9
-3
lines changed 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ impl BuiltIn {
32
32
33
33
let word = word_token. token ( ) ;
34
34
let word_case = unicase:: UniCase :: new ( word) ;
35
- let mut corrections = if let Some ( corrections) = self . correct_with_dict ( word_case) {
35
+ let mut corrections = if let Some ( corrections) = self . correct_word_with_dict ( word_case) {
36
36
if corrections. is_empty ( ) {
37
37
Status :: Invalid
38
38
} else {
@@ -51,14 +51,20 @@ impl BuiltIn {
51
51
#[ cfg( feature = "dict" ) ]
52
52
impl BuiltIn {
53
53
// Not using `Status` to avoid the allocations
54
- fn correct_with_dict ( & self , word : unicase:: UniCase < & str > ) -> Option < & ' static [ & ' static str ] > {
54
+ fn correct_word_with_dict (
55
+ & self ,
56
+ word : unicase:: UniCase < & str > ,
57
+ ) -> Option < & ' static [ & ' static str ] > {
55
58
typos_dict:: WORD_TRIE . find ( & word) . copied ( )
56
59
}
57
60
}
58
61
59
62
#[ cfg( not( feature = "dict" ) ) ]
60
63
impl BuiltIn {
61
- fn correct_with_dict ( & self , _word : unicase:: UniCase < & str > ) -> Option < & ' static [ & ' static str ] > {
64
+ fn correct_word_with_dict (
65
+ & self ,
66
+ _word : unicase:: UniCase < & str > ,
67
+ ) -> Option < & ' static [ & ' static str ] > {
62
68
None
63
69
}
64
70
}
You can’t perform that action at this time.
0 commit comments