diff --git a/src/read/elf/note.rs b/src/read/elf/note.rs index e2beef92..72a8c80e 100644 --- a/src/read/elf/note.rs +++ b/src/read/elf/note.rs @@ -87,6 +87,20 @@ where } } +impl<'data, Elf: FileHeader> Iterator for NoteIterator<'data, Elf> { + type Item = read::Result>; + fn next(&mut self) -> Option { + match self.next() { + Err(e) => { + self.data = Bytes(&[]); + Some(Err(e)) + } + Ok(Some(v)) => Some(Ok(v)), + Ok(None) => None, + } + } +} + /// A parsed [`NoteHeader`]. #[derive(Debug)] pub struct Note<'data, Elf>