Skip to content

Commit 0643b61

Browse files
authored
read/elf: remove unneeded lifetimes (#681)
While these should be true in practice, they aren't needed, and their presence may require callers to annotate them too.
1 parent f0f2d55 commit 0643b61

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/read/elf/section.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<'data, Elf: FileHeader, R: ReadRef<'data>> SectionTable<'data, Elf, R> {
8484
pub fn section_name(
8585
&self,
8686
endian: Elf::Endian,
87-
section: &'data Elf::SectionHeader,
87+
section: &Elf::SectionHeader,
8888
) -> read::Result<&'data [u8]> {
8989
section.name(endian, self.strings)
9090
}

src/read/elf/symbol.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<'data, Elf: FileHeader, R: ReadRef<'data>> SymbolTable<'data, Elf, R> {
162162
pub fn symbol_section(
163163
&self,
164164
endian: Elf::Endian,
165-
symbol: &'data Elf::Sym,
165+
symbol: &Elf::Sym,
166166
index: usize,
167167
) -> read::Result<Option<SectionIndex>> {
168168
match symbol.st_shndx(endian) {
@@ -177,11 +177,7 @@ impl<'data, Elf: FileHeader, R: ReadRef<'data>> SymbolTable<'data, Elf, R> {
177177
}
178178

179179
/// Return the symbol name for the given symbol.
180-
pub fn symbol_name(
181-
&self,
182-
endian: Elf::Endian,
183-
symbol: &'data Elf::Sym,
184-
) -> read::Result<&'data [u8]> {
180+
pub fn symbol_name(&self, endian: Elf::Endian, symbol: &Elf::Sym) -> read::Result<&'data [u8]> {
185181
symbol.name(endian, self.strings)
186182
}
187183

0 commit comments

Comments
 (0)