mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #18968 - mbrubeck:try, r=emilio
Use try syntax for Option where appropriate - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are refactoring only <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18968) <!-- Reviewable:end -->
This commit is contained in:
commit
2b03a9974c
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