Skip to content

Commit

Permalink
read/elf: remove unneeded lifetimes
Browse files Browse the repository at this point in the history
While these should be true in practice, they aren't needed,
and their presence may require callers to annotate them too.
  • Loading branch information
philipc committed May 8, 2024
1 parent f0f2d55 commit f295688
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/read/elf/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl<'data, Elf: FileHeader, R: ReadRef<'data>> SectionTable<'data, Elf, R> {
pub fn section_name(
&self,
endian: Elf::Endian,
section: &'data Elf::SectionHeader,
section: &Elf::SectionHeader,
) -> read::Result<&'data [u8]> {
section.name(endian, self.strings)
}
Expand Down
4 changes: 2 additions & 2 deletions src/read/elf/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl<'data, Elf: FileHeader, R: ReadRef<'data>> SymbolTable<'data, Elf, R> {
pub fn symbol_section(
&self,
endian: Elf::Endian,
symbol: &'data Elf::Sym,
symbol: &Elf::Sym,
index: usize,
) -> read::Result<Option<SectionIndex>> {
match symbol.st_shndx(endian) {
Expand All @@ -180,7 +180,7 @@ impl<'data, Elf: FileHeader, R: ReadRef<'data>> SymbolTable<'data, Elf, R> {
pub fn symbol_name(
&self,
endian: Elf::Endian,
symbol: &'data Elf::Sym,
symbol: &Elf::Sym,
) -> read::Result<&'data [u8]> {
symbol.name(endian, self.strings)
}
Expand Down

0 comments on commit f295688

Please sign in to comment.