aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-25 15:19:46 +0100
committerGitHub <[email protected]>2019-09-25 15:19:46 +0100
commita452e50e0e89390b8a055f0c7c64100e9872edac (patch)
treeefcb288188e086dd7d37747eece043550ca746dc /crates/ra_assists
parentbb467b857eabb0c930316ff066b30c395d7fa63b (diff)
parentb7422bd1abd03c02b4aa4a6a5d3dcc1136d37a42 (diff)
Merge #1911
1911: fewer monomorphisations r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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 81621afef..55c0aa59f 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