mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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
|
@ -384,10 +384,7 @@ impl LineBreaker {
|
|||
-> Option<Fragment>
|
||||
where I: Iterator<Item=Fragment>,
|
||||
{
|
||||
let mut result = match self.next_fragment(old_fragment_iter) {
|
||||
None => return None,
|
||||
Some(fragment) => fragment,
|
||||
};
|
||||
let mut result = self.next_fragment(old_fragment_iter)?;
|
||||
|
||||
loop {
|
||||
let candidate = match self.next_fragment(old_fragment_iter) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue