Commit d19c7069 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Use ? operator instead of explictly propagating None

parent fa298728
......@@ -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)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment