File tree Expand file tree Collapse file tree
crates/ide-assists/src/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ fn generate_module_def(
199199 . map ( |it| it. indent ( IndentLevel ( 1 ) ) )
200200 . collect_vec ( ) ;
201201 let impl_detached = ast:: Impl :: cast ( impl_. syntax ( ) . clone_subtree ( ) ) . unwrap ( ) ;
202- let mut editor = SyntaxEditor :: new ( impl_detached. syntax ( ) . clone ( ) ) ;
202+ let ( mut editor, _ ) = SyntaxEditor :: new ( impl_detached. syntax ( ) . clone ( ) ) ;
203203 let make_editor = SyntaxFactory :: with_mappings ( ) ;
204204 let assoc_item_list = make_editor. assoc_item_list ( assoc_items) ;
205205 if let Some ( existing_list) = impl_detached. assoc_item_list ( ) {
@@ -412,7 +412,7 @@ impl Module {
412412 } )
413413 . collect ( ) ;
414414 if !replacements. is_empty ( ) {
415- let mut editor = SyntaxEditor :: new ( entry. syntax ( ) . clone ( ) ) ;
415+ let ( mut editor, _ ) = SyntaxEditor :: new ( entry. syntax ( ) . clone ( ) ) ;
416416 for ( parent, new_ref) in & replacements {
417417 editor. replace ( parent, new_ref. syntax ( ) ) ;
418418 }
@@ -485,7 +485,7 @@ impl Module {
485485 continue ;
486486 }
487487
488- let mut editor = SyntaxEditor :: new ( body_item. syntax ( ) . clone ( ) ) ;
488+ let ( mut editor, _ ) = SyntaxEditor :: new ( body_item. syntax ( ) . clone ( ) ) ;
489489 for target in insert_targets {
490490 editor. insert_all (
491491 Position :: before ( target) ,
You can’t perform that action at this time.
0 commit comments