mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
replace match by if let statements if possible
This commit is contained in:
parent
608511ddc3
commit
b78979d692
7 changed files with 39 additions and 58 deletions
|
@ -286,13 +286,10 @@ impl TreeWalker {
|
|||
NodeFilterConstants::FILTER_SKIP => {
|
||||
// "1. Let child be node's first child if type is first,
|
||||
// and node's last child if type is last."
|
||||
match next_child(&node) {
|
||||
if let Some(child) = next_child(&node) {
|
||||
// "2. If child is not null, set node to child and goto Main."
|
||||
Some(child) => {
|
||||
node = child;
|
||||
continue 'main
|
||||
},
|
||||
None => {}
|
||||
node = child;
|
||||
continue 'main
|
||||
}
|
||||
},
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue