mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 12:04:43 +00:00 
			
		
		
		
	Migrate generate_impl assist to use SyntaxEditor
				
					
				
			This commit is contained in:
		
							parent
							
								
									e9968fc555
								
							
						
					
					
						commit
						c3a5a8c22a
					
				
					 1 changed files with 16 additions and 9 deletions
				
			
		|  | @ -1,14 +1,14 @@ | |||
| use syntax::{ | ||||
|     ast::{self, AstNode, HasName, edit_in_place::Indent, make}, | ||||
|     ted, | ||||
|     syntax_editor::{Position, SyntaxEditor}, | ||||
| }; | ||||
| 
 | ||||
| use crate::{AssistContext, AssistId, Assists, utils}; | ||||
| 
 | ||||
| fn insert_impl(impl_: ast::Impl, nominal: &ast::Adt) { | ||||
| fn insert_impl(editor: &mut SyntaxEditor, impl_: &ast::Impl, nominal: &ast::Adt) { | ||||
|     let indent = nominal.indent_level(); | ||||
|     ted::insert_all_raw( | ||||
|         ted::Position::after(nominal.syntax()), | ||||
|     editor.insert_all( | ||||
|         Position::after(nominal.syntax()), | ||||
|         vec Hayashi Mikihiro
						Hayashi Mikihiro