From 6a12088f1757bc4f72d122aa0c9a2e10cc9e624e Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Mon, 15 Jun 2026 09:53:30 +0200 Subject: [PATCH] elf: remove From impl This impl doesn't feel very idiomatic and a direct invocation is clearer. --- multiboot2/src/elf_sections.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/multiboot2/src/elf_sections.rs b/multiboot2/src/elf_sections.rs index 8ce5a62b..b3b5f4f6 100644 --- a/multiboot2/src/elf_sections.rs +++ b/multiboot2/src/elf_sections.rs @@ -64,7 +64,7 @@ impl ElfSectionsTag { /// Returns the string table data, if it's present. #[must_use] pub fn string_table(&self) -> Option<&[u8]> { - let shdr_table: SectionHeaderTable = self.into(); + let shdr_table = SectionHeaderTable::new(NativeEndian, self.class(), &self.sections); // Info for this here // https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-43405.html @ `e_shstrndx` @@ -106,12 +106,6 @@ impl ElfSectionsTag { } } -impl<'a> From<&'a ElfSectionsTag> for SectionHeaderTable<'a, NativeEndian> { - fn from(value: &'a ElfSectionsTag) -> Self { - SectionHeaderTable::new(NativeEndian, value.class(), &value.sections) - } -} - impl MaybeDynSized for ElfSectionsTag { type Header = TagHeader;