use Vec::extend instead of Vec::push in loop

Co-Authored-By: Laurențiu Nicola <lnicola@users.noreply.github.com>
This commit is contained in:
Adam Bratschi-Kaye 2020-02-20 08:35:09 +01:00 committed by adamrk
parent 8b3f449b5f
commit 7be1044104

View file

@ -110,9 +110,7 @@ fn rename_mod(
)
})
.collect::<Vec<_>>();
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))