style: Use the ? operator for Option

This commit is contained in:
Matt Brubeck 2017-12-08 16:53:17 -08:00
parent c52d347022
commit 3005a26daf
13 changed files with 47 additions and 129 deletions

View file

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