File tree Expand file tree Collapse file tree 1 file changed +1
-31
lines changed Expand file tree Collapse file tree 1 file changed +1
-31
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2021 Works Applications Co., Ltd.
2+ * Copyright (c) 2021-2024 Works Applications Co., Ltd.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1414 * limitations under the License.
1515 */
1616
17- use std:: iter:: FusedIterator ;
18-
19- use crate :: dic:: lexicon_set:: LexiconSet ;
2017use crate :: dic:: read:: u32_parser;
2118use crate :: dic:: read:: word_info:: WordInfoParser ;
2219use crate :: dic:: subset:: InfoSubset ;
@@ -177,30 +174,3 @@ impl From<WordInfo> for WordInfoData {
177174 info. data
178175 }
179176}
180-
181- struct SplitIter < ' a > {
182- index : usize ,
183- split : & ' a [ WordId ] ,
184- lexicon : & ' a LexiconSet < ' a > ,
185- }
186-
187- impl Iterator for SplitIter < ' _ > {
188- type Item = SudachiResult < WordInfo > ;
189-
190- fn next ( & mut self ) -> Option < Self :: Item > {
191- let idx = self . index ;
192- if idx >= self . split . len ( ) {
193- None
194- } else {
195- self . index += 1 ;
196- Some ( self . lexicon . get_word_info ( self . split [ idx] ) )
197- }
198- }
199-
200- fn size_hint ( & self ) -> ( usize , Option < usize > ) {
201- let rem = self . split . len ( ) - self . index ;
202- ( rem, Some ( rem) )
203- }
204- }
205-
206- impl FusedIterator for SplitIter < ' _ > { }
You can’t perform that action at this time.
0 commit comments