mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -895,11 +895,7 @@ impl LayoutThread {
|
|||
}
|
||||
|
||||
fn try_get_layout_root<N: LayoutNode>(&self, node: N) -> Option<FlowRef> {
|
||||
let mut data = match node.mutate_layout_data() {
|
||||
Some(x) => x,
|
||||
None => return None,
|
||||
};
|
||||
let result = data.flow_construction_result.get();
|
||||
let result = node.mutate_layout_data()?.flow_construction_result.get();
|
||||
|
||||
let mut flow = match result {
|
||||
ConstructionResult::Flow(mut flow, abs_descendants) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue