File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,7 @@ pub(crate) fn fill_match_arms(ctx: AssistCtx) -> Option<Assist> {
9797 }
9898
9999 ctx. add_assist ( AssistId ( "fill_match_arms" ) , "Fill match arms" , |edit| {
100- let new_arm_list =
101- match_arm_list. remove_placeholder ( ) . append_arms ( missing_arms. into_iter ( ) ) ;
100+ let new_arm_list = match_arm_list. remove_placeholder ( ) . append_arms ( missing_arms) ;
102101
103102 edit. target ( match_expr. syntax ( ) . text_range ( ) ) ;
104103 edit. set_cursor ( expr. syntax ( ) . text_range ( ) . start ( ) ) ;
Original file line number Diff line number Diff line change @@ -80,12 +80,12 @@ where
8080
8181impl ast:: ItemList {
8282 #[ must_use]
83- pub fn append_items ( & self , items : impl Iterator < Item = ast:: ImplItem > ) -> ast:: ItemList {
83+ pub fn append_items ( & self , items : impl IntoIterator < Item = ast:: ImplItem > ) -> ast:: ItemList {
8484 let mut res = self . clone ( ) ;
8585 if !self . syntax ( ) . text ( ) . contains_char ( '\n' ) {
8686 res = make_multiline ( res) ;
8787 }
88- items. for_each ( |it| res = res. append_item ( it) ) ;
88+ items. into_iter ( ) . for_each ( |it| res = res. append_item ( it) ) ;
8989 res
9090 }
9191
@@ -339,13 +339,13 @@ impl ast::UseTree {
339339
340340impl ast:: MatchArmList {
341341 #[ must_use]
342- pub fn append_arms ( & self , items : impl Iterator < Item = ast:: MatchArm > ) -> ast:: MatchArmList {
342+ pub fn append_arms ( & self , items : impl IntoIterator < Item = ast:: MatchArm > ) -> ast:: MatchArmList {
343343 let mut res = self . clone ( ) ;
344344 res = res. strip_if_only_whitespace ( ) ;
345345 if !res. syntax ( ) . text ( ) . contains_char ( '\n' ) {
346346 res = make_multiline ( res) ;
347347 }
348- items. for_each ( |it| res = res. append_arm ( it) ) ;
348+ items. into_iter ( ) . for_each ( |it| res = res. append_arm ( it) ) ;
349349 res
350350 }
351351
You can’t perform that action at this time.
0 commit comments