From b7422bd1abd03c02b4aa4a6a5d3dcc1136d37a42 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 25 Sep 2019 17:19:16 +0300 Subject: fewer monomorphisations --- crates/ra_assists/src/ast_editor.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_assists') 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 AstEditor { fn insert_children( &self, position: InsertPosition, - to_insert: impl Iterator, + mut to_insert: impl Iterator, ) -> N { - let new_syntax = insert_children(self.ast().syntax(), position, to_insert); + let new_syntax = insert_children(self.ast().syntax(), position, &mut to_insert); N::cast(new_syntax).unwrap() } @@ -54,9 +54,9 @@ impl AstEditor { fn replace_children( &self, to_delete: RangeInclusive, - to_insert: impl Iterator, + mut to_insert: impl Iterator, ) -> N { - let new_syntax = replace_children(self.ast().syntax(), to_delete, to_insert); + let new_syntax = replace_children(self.ast().syntax(), to_delete, &mut to_insert); N::cast(new_syntax).unwrap() } -- cgit v1.2.3