mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #18968 - mbrubeck:try, r=emilio
Use try syntax for Option where appropriate - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are refactoring only <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18968) <!-- Reviewable:end -->
This commit is contained in:
commit
2b03a9974c
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