mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Use the ? operator for Option
This commit is contained in:
parent
c52d347022
commit
3005a26daf
13 changed files with 47 additions and 129 deletions
|
@ -196,11 +196,7 @@ impl<'a> Iterator for DocumentCascadeDataIter<'a> {
|
|||
type Item = (&'a CascadeData, Origin);
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
let (_, origin) = match self.iter.next() {
|
||||
Some(o) => o,
|
||||
None => return None,
|
||||
};
|
||||
|
||||
let (_, origin) = self.iter.next()?;
|
||||
Some((self.cascade_data.borrow_for_origin(origin), origin))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue