Use try syntax for Option where appropriate

This commit is contained in:
Matt Brubeck 2017-10-20 08:25:35 -07:00
parent fe16c1d5c3
commit 2d45e9d2da
19 changed files with 65 additions and 180 deletions

View file

@ -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)
}