diff options
author | Adam Bratschi-Kaye <[email protected]> | 2020-02-20 07:35:09 +0000 |
---|---|---|
committer | adamrk <[email protected]> | 2020-02-21 22:51:30 +0000 |
commit | 7be104410468a1fdcb01e5b98bedb7438b2c99f0 (patch) | |
tree | c1d24c27a4d5a261b644fd69916487d8e3c941f7 /crates | |
parent | 8b3f449b5f848b43c8bbb9aea431ce4df8090fd4 (diff) |
use Vec::extend instead of Vec::push in loop
Co-Authored-By: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide/src/references/rename.rs | 4 |
1 files changed, 1 insertions, 3 deletions
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( | |||
110 | ) | 110 | ) |
111 | }) | 111 | }) |
112 | .collect::<Vec<_>>(); | 112 | .collect::<Vec<_>>(); |
113 | for ref_edit in ref_edits { | 113 | source_file_edits.extend(ref_edits); |
114 | source_file_edits.push(ref_edit); | ||
115 | } | ||
116 | } | 114 | } |
117 | 115 | ||
118 | Some(SourceChange::from_edits("rename", source_file_edits, file_system_edits)) | 116 | Some(SourceChange::from_edits("rename", source_file_edits, file_system_edits)) |