diff options
Diffstat (limited to 'crates/ra_assists/src/ast_editor.rs')
-rw-r--r-- | crates/ra_assists/src/ast_editor.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs index a35334d7e..36235eb13 100644 --- a/crates/ra_assists/src/ast_editor.rs +++ b/crates/ra_assists/src/ast_editor.rs | |||
@@ -22,7 +22,10 @@ impl<N: AstNode> AstEditor<N> { | |||
22 | // FIXME: compute a more fine-grained diff here. | 22 | // FIXME: compute a more fine-grained diff here. |
23 | // If *you* know a nice algorithm to compute diff between two syntax | 23 | // If *you* know a nice algorithm to compute diff between two syntax |
24 | // tree, tell me about it! | 24 | // tree, tell me about it! |
25 | builder.replace(self.original_ast.syntax().range(), self.ast().syntax().text().to_string()); | 25 | builder.replace( |
26 | self.original_ast.syntax().text_range(), | ||
27 | self.ast().syntax().text().to_string(), | ||
28 | ); | ||
26 | } | 29 | } |
27 | 30 | ||
28 | pub fn ast(&self) -> &N { | 31 | pub fn ast(&self) -> &N { |