mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 19:41:09 +00:00
Use ? operator instead of explictly propagating None
This commit is contained in:
parent
fa29872863
commit
d19c70694a
1 changed files with 2 additions and 6 deletions
|
@ -372,13 +372,9 @@ macro_rules! define_iter(
|
|||
}
|
||||
|
||||
unsafe {
|
||||
let item = $get_item(self.caps, self.idx);
|
||||
if item.is_none() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let item = $get_item(self.caps, self.idx)?;
|
||||
self.idx += 1;
|
||||
item
|
||||
Some(item)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue