aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/ast_editor.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs
index a710edce8..cf32ea52d 100644
--- a/crates/ra_assists/src/ast_editor.rs
+++ b/crates/ra_assists/src/ast_editor.rs
@@ -44,9 +44,9 @@ impl<N: AstNode> AstEditor<N> {
44 fn insert_children( 44 fn insert_children(
45 &self, 45 &self,
46 position: InsertPosition<SyntaxElement>, 46 position: InsertPosition<SyntaxElement>,
47 to_insert: impl Iterator<Item = SyntaxElement>, 47 mut to_insert: impl Iterator<Item = SyntaxElement>,
48 ) -> N { 48 ) -> N {
49 let new_syntax = insert_children(self.ast().syntax(), position, to_insert); 49 let new_syntax = insert_children(self.ast().syntax(), position, &mut to_insert);
50 N::cast(new_syntax).unwrap() 50 N::cast(new_syntax).unwrap()
51 } 51 }
52 52
@@ -54,9 +54,9 @@ impl<N: AstNode> AstEditor<N> {
54 fn replace_children( 54 fn replace_children(
55 &self, 55 &self,
56 to_delete: RangeInclusive<SyntaxElement>, 56 to_delete: RangeInclusive<SyntaxElement>,
57 to_insert: impl Iterator<Item = SyntaxElement>, 57 mut to_insert: impl Iterator<Item = SyntaxElement>,
58 ) -> N { 58 ) -> N {
59 let new_syntax = replace_children(self.ast().syntax(), to_delete, to_insert); 59 let new_syntax = replace_children(self.ast().syntax(), to_delete, &mut to_insert);
60 N::cast(new_syntax).unwrap() 60 N::cast(new_syntax).unwrap()
61 } 61 }
62 62