From 7be104410468a1fdcb01e5b98bedb7438b2c99f0 Mon Sep 17 00:00:00 2001 From: Adam Bratschi-Kaye Date: Thu, 20 Feb 2020 08:35:09 +0100 Subject: use Vec::extend instead of Vec::push in loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Laurențiu Nicola --- crates/ra_ide/src/references/rename.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index 97a97c0ae..bcb62b33d 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs @@ -110,9 +110,7 @@ fn rename_mod( ) }) .collect::>(); - for ref_edit in ref_edits { - source_file_edits.push(ref_edit); - } + source_file_edits.extend(ref_edits); } Some(SourceChange::from_edits("rename", source_file_edits, file_system_edits)) -- cgit v1.2.3