aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ef2535d..301944c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -208,8 +208,8 @@ pub struct Elf<'bytes, const N: usize> {
load_segments: [Option<LoadSegment<'bytes>>; N],
}
-impl<const N: usize> Elf<'_, N> {
- pub fn parse(b: &[u8]) -> Result<Elf<'_, N>> {
+impl<'bytes, const N: usize> Elf<'bytes, N> {
+ pub fn parse(b: &'bytes [u8]) -> Result<Elf<'bytes, N>> {
let mut r = ElfReader::new(b);
//
@@ -337,7 +337,7 @@ impl<const N: usize> Elf<'_, N> {
}
#[inline]
- pub fn load_segments(&self) -> impl Iterator<Item = &LoadSegment<'_>> {
+ pub fn load_segments(&self) -> impl Iterator<Item = &LoadSegment<'bytes>> {
self.load_segments.iter().flatten()
}
}