mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-30 05:21:05 +00:00
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,
|
Some(IteratorError::Error) => return None,
|
||||||
|
|
||||||
// The iterator needs a resync
|
// The iterator needs a resync
|
||||||
Some(IteratorError::Resync) => {
|
Some(IteratorError::Resync) => self.inner.resync(),
|
||||||
self.inner.resync();
|
|
||||||
self.error = None;
|
|
||||||
}
|
|
||||||
|
|
||||||
None => {}
|
None => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
let res = self.inner.next();
|
let res = self.inner.next();
|
||||||
|
self.error = res.as_ref().err().copied();
|
||||||
if let Err(err) = &res {
|
|
||||||
self.error = Some(*err);
|
|
||||||
}
|
|
||||||
|
|
||||||
res.transpose()
|
res.transpose()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue