File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ pub unsafe extern "C" fn chewing_new2(
163163
164164 let estimate = LaxUserFreqEstimate :: max_from ( user_dictionary. as_ref ( ) ) ;
165165
166- let system_dicts = Vec :: from_iter ( dictionaries. into_iter ( ) . chain ( drop_in_dicts. into_iter ( ) ) ) ;
166+ let system_dicts = Vec :: from_iter ( dictionaries. into_iter ( ) . chain ( drop_in_dicts) ) ;
167167 let dict = Layered :: new ( system_dicts, user_dictionary) ;
168168 let conversion_engine = Box :: new ( ChewingEngine :: new ( ) ) ;
169169 let kb_compat = KeyboardLayoutCompat :: Default ;
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ impl Editor {
194194 let sys_loader = SystemDictionaryLoader :: new ( ) ;
195195 let base_dict = sys_loader. load ( ) ?;
196196 let drop_in_dict = sys_loader. load_drop_in ( ) ?;
197- let system_dict = Vec :: from_iter ( base_dict. into_iter ( ) . chain ( drop_in_dict. into_iter ( ) ) ) ;
197+ let system_dict = Vec :: from_iter ( base_dict. into_iter ( ) . chain ( drop_in_dict) ) ;
198198 let user_dict = UserDictionaryLoader :: new ( ) . load ( ) ?;
199199 let estimate = LaxUserFreqEstimate :: max_from ( user_dict. as_ref ( ) ) ;
200200 let dict = Layered :: new ( system_dict, user_dict) ;
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ fn project_data_dir() -> Option<PathBuf> {
148148 if let Ok ( path) = env:: var ( "XDG_DATA_HOME" ) {
149149 return Some ( PathBuf :: from ( path) . join ( "chewing" ) ) ;
150150 }
151- return env:: home_dir ( ) . map ( |path| path. join ( ".local" ) . join ( "share" ) . join ( "chewing" ) ) ;
151+ env:: home_dir ( ) . map ( |path| path. join ( ".local" ) . join ( "share" ) . join ( "chewing" ) )
152152 }
153153}
154154
Original file line number Diff line number Diff line change @@ -125,8 +125,7 @@ fn parse_line(
125125) -> Result < ( Vec < Syllable > , & str , u32 ) > {
126126 let phrase = line
127127 . split ( delimiter)
128- . filter ( |s| !s. is_empty ( ) )
129- . next ( )
128+ . find ( |s| !s. is_empty ( ) )
130129 . ok_or ( parse_error ( line_num, line) ) ?
131130 . trim_matches ( '"' ) ;
132131
You can’t perform that action at this time.
0 commit comments