@@ -6,8 +6,7 @@ use smallvec::ToSmallVec;
6
6
use super :: matcher:: Matcher ;
7
7
use super :: word_list:: MarkedWord ;
8
8
use super :: Error ;
9
- use crate :: spell:: DictWord ;
10
- use crate :: Span ;
9
+ use crate :: { CharString , Span } ;
11
10
12
11
#[ derive( Debug , Clone ) ]
13
12
struct AffixReplacement {
@@ -111,7 +110,7 @@ impl AttributeList {
111
110
/// Will append to the given `dest`;
112
111
///
113
112
/// In the future, I want to make this function cleaner and faster.
114
- pub fn expand_marked_word ( & self , word : MarkedWord , dest : & mut Vec < DictWord > ) {
113
+ pub fn expand_marked_word ( & self , word : MarkedWord , dest : & mut Vec < CharString > ) {
115
114
dest. reserve ( word. attributes . len ( ) + 1 ) ;
116
115
117
116
let start_len = dest. len ( ) ;
@@ -173,7 +172,7 @@ impl AttributeList {
173
172
pub fn expand_marked_words (
174
173
& self ,
175
174
words : impl IntoIterator < Item = MarkedWord > ,
176
- dest : & mut Vec < DictWord >
175
+ dest : & mut Vec < CharString >
177
176
) {
178
177
for word in words {
179
178
self . expand_marked_word ( word, dest) ;
@@ -184,7 +183,7 @@ impl AttributeList {
184
183
replacement : & AffixReplacement ,
185
184
letters : & [ char ] ,
186
185
suffix : bool
187
- ) -> Option < DictWord > {
186
+ ) -> Option < CharString > {
188
187
if replacement. condition . len ( ) > letters. len ( ) {
189
188
return None ;
190
189
}
@@ -199,7 +198,7 @@ impl AttributeList {
199
198
200
199
if replacement. condition . matches ( target_segment) {
201
200
let mut replaced_segment = letters. to_smallvec ( ) ;
202
- let mut remove: DictWord = replacement. remove . to_smallvec ( ) ;
201
+ let mut remove: CharString = replacement. remove . to_smallvec ( ) ;
203
202
204
203
if !suffix {
205
204
replaced_segment. reverse ( ) ;
0 commit comments