From b6ca082a101c1a8f70c299a54e2c4c3cd7dd0ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Thu, 21 Nov 2024 23:26:33 +0100 Subject: [PATCH] spcasm: remove unneeded pin --- src/elf.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/elf.rs b/src/elf.rs index 958db80..bc50248 100644 --- a/src/elf.rs +++ b/src/elf.rs @@ -3,7 +3,6 @@ use std::cell::Cell; use std::io::Write; -use std::pin::Pin; #[allow(unused)] use flexstr::{shared_str, IntoSharedStr, SharedStr, ToSharedStr}; @@ -55,13 +54,12 @@ pub fn write_to_elf( // - shstrtab section (section header string table) // - Section headers (yes, weird position, but I don't want to mess with something that readelf accepts) - // TODO: Check if Pin is necessary here. - let mut segments: Vec>> = Vec::new(); + let mut segments: Vec> = Vec::new(); // Step 1: Create metadata. // Since segments is a BTreeMap, it will always be sorted by address, simplifying later write steps. for (segment_start, segment_contents) in data.segments { - let metadata = Box::pin(SegmentMetadata { + let metadata = Box::new(SegmentMetadata { name: format!(".text_{segment_start:04X}"), name_id: Cell::new(None), section_index: Cell::new(None),