aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/algo.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/algo.rs b/crates/ra_syntax/src/algo.rs
index 45f624810..7ee5aa85b 100644
--- a/crates/ra_syntax/src/algo.rs
+++ b/crates/ra_syntax/src/algo.rs
@@ -70,7 +70,7 @@ pub enum InsertPosition<T> {
70pub fn insert_children( 70pub fn insert_children(
71 parent: &SyntaxNode, 71 parent: &SyntaxNode,
72 position: InsertPosition<SyntaxElement>, 72 position: InsertPosition<SyntaxElement>,
73 to_insert: impl Iterator<Item = SyntaxElement>, 73 to_insert: &mut dyn Iterator<Item = SyntaxElement>,
74) -> SyntaxNode { 74) -> SyntaxNode {
75 let mut delta = TextUnit::default(); 75 let mut delta = TextUnit::default();
76 let to_insert = to_insert.map(|element| { 76 let to_insert = to_insert.map(|element| {
@@ -108,7 +108,7 @@ pub fn insert_children(
108pub fn replace_children( 108pub fn replace_children(
109 parent: &SyntaxNode, 109 parent: &SyntaxNode,
110 to_delete: RangeInclusive<SyntaxElement>, 110 to_delete: RangeInclusive<SyntaxElement>,
111 to_insert: impl Iterator<Item = SyntaxElement>, 111 to_insert: &mut dyn Iterator<Item = SyntaxElement>,
112) -> SyntaxNode { 112) -> SyntaxNode {
113 let start = position_of_child(parent, to_delete.start().clone()); 113 let start = position_of_child(parent, to_delete.start().clone());
114 let end = position_of_child(parent, to_delete.end().clone()); 114 let end = position_of_child(parent, to_delete.end().clone());