mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Use try syntax for Option where appropriate
This commit is contained in:
parent
fe16c1d5c3
commit
2d45e9d2da
19 changed files with 65 additions and 180 deletions
|
@ -480,10 +480,7 @@ impl<I> Iterator for FragmentParsingResult<I>
|
|||
type Item = DomRoot<Node>;
|
||||
|
||||
fn next(&mut self) -> Option<DomRoot<Node>> {
|
||||
let next = match self.inner.next() {
|
||||
Some(next) => next,
|
||||
None => return None,
|
||||
};
|
||||
let next = self.inner.next()?;
|
||||
next.remove_self();
|
||||
Some(next)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue