mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
style: Use the ? operator for Option
This commit is contained in:
parent
c52d347022
commit
3005a26daf
13 changed files with 47 additions and 129 deletions
|
@ -127,10 +127,7 @@ impl<'a, E> ElementWrapper<'a, E>
|
|||
if lang.is_some() {
|
||||
return lang;
|
||||
}
|
||||
match current.parent_element() {
|
||||
Some(parent) => current = parent,
|
||||
None => return None,
|
||||
}
|
||||
current = current.parent_element()?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue