Minor simplification

This commit is contained in:
bjorn3
2020-09-30 12:33:12 +02:00
parent b1187b5507
commit 6161acfba5

View File

@@ -455,8 +455,7 @@ impl Backend for ObjectBackend {
}
fn finish(mut self, contents: &ModuleContents<Self>) -> ObjectProduct {
let mut symbol_relocs = Vec::new();
mem::swap(&mut symbol_relocs, &mut self.relocs);
let symbol_relocs = mem::take(&mut self.relocs);
for symbol in symbol_relocs {
for &RelocRecord {
offset,