Fix doc of take_slice_or_kill

Co-authored-by: Dr. Maxim Orlovsky <orlovsky@pandoracore.com>
This commit is contained in:
Martin Habovštiak 2022-03-14 21:17:38 +01:00 committed by Martin Habovstiak
parent 0ec6d96a7b
commit e6ff754b73
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ impl<'a> Instructions<'a> {
} }
/// takes `len` bytes long slice from iterator and returns it advancing iterator /// takes `len` bytes long slice from iterator and returns it advancing iterator
/// if the iterator is not long enough `None` is returned and the iterator is killed /// if the iterator is not long enough [`Error::EarlyEndOfScript`] is returned and the iterator is killed
/// to avoid returning an infinite stream of errors. /// to avoid returning an infinite stream of errors.
fn take_slice_or_kill(&mut self, len: usize) -> Result<&'a [u8], Error> { fn take_slice_or_kill(&mut self, len: usize) -> Result<&'a [u8], Error> {
if self.data.len() >= len { if self.data.len() >= len {