Skip to content

elf: remove From impl#299

Open
phip1611 wants to merge 1 commit into
mainfrom
misc
Open

elf: remove From impl#299
phip1611 wants to merge 1 commit into
mainfrom
misc

Conversation

@phip1611

Copy link
Copy Markdown
Member

This impl doesn't feel very idiomatic and a direct invocation is clearer.

Follow-up of #292.

This impl doesn't feel very idiomatic and a direct invocation is
clearer.
@phip1611 phip1611 self-assigned this Jun 15, 2026
@phip1611 phip1611 enabled auto-merge June 15, 2026 07:56
#[must_use]
pub fn string_table(&self) -> Option<&[u8]> {
let shdr_table: SectionHeaderTable<NativeEndian> = self.into();
let shdr_table = SectionHeaderTable::new(NativeEndian, self.class(), &self.sections);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @an-owl - I think the From impl was not very idiomatic Rust. I decided to switch back to a normal constructor.

Nevertheless: thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant