forked from mirrors/gstreamer-rs
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 {
|
unsafe {
|
||||||
let item = $get_item(self.caps, self.idx);
|
let item = $get_item(self.caps, self.idx)?;
|
||||||
if item.is_none() {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.idx += 1;
|
self.idx += 1;
|
||||||
item
|
Some(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue