mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -78,10 +78,7 @@ impl<'a, T> Iterator for PersistentListIterator<'a, T> where T: Send + Sync + 's
|
|||
|
||||
#[inline]
|
||||
fn next(&mut self) -> Option<&'a T> {
|
||||
let entry = match self.entry {
|
||||
None => return None,
|
||||
Some(entry) => entry,
|
||||
};
|
||||
let entry = self.entry?;
|
||||
let value = &entry.value;
|
||||
self.entry = match entry.next {
|
||||
None => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue