forked from mirrors/gstreamer-rs
iterator: Simplify StdIterator a bit
This commit is contained in:
parent
79d3888c3d
commit
eaacee49de
1 changed files with 2 additions and 9 deletions
|
@ -665,20 +665,13 @@ where
|
|||
Some(IteratorError::Error) => return None,
|
||||
|
||||
// The iterator needs a resync
|
||||
Some(IteratorError::Resync) => {
|
||||
self.inner.resync();
|
||||
self.error = None;
|
||||
}
|
||||
Some(IteratorError::Resync) => self.inner.resync(),
|
||||
|
||||
None => {}
|
||||
}
|
||||
|
||||
let res = self.inner.next();
|
||||
|
||||
if let Err(err) = &res {
|
||||
self.error = Some(*err);
|
||||
}
|
||||
|
||||
self.error = res.as_ref().err().copied();
|
||||
res.transpose()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue