mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use the Deref traits for FlowRefs.
This patch switches FlowRefs to using the Deref and DerefMut traits, instead of the custom `get` and `get_mut` functions.
This commit is contained in:
parent
afc144aa39
commit
76ed7484eb
10 changed files with 76 additions and 74 deletions
|
@ -52,7 +52,7 @@ pub fn traverse_flow_tree_preorder(root: &mut FlowRef,
|
|||
|
||||
let layout_context = LayoutContext::new(shared_layout_context);
|
||||
|
||||
let root = root.get_mut();
|
||||
let root = root.deref_mut();
|
||||
|
||||
if layout_context.shared.opts.bubble_inline_sizes_separately {
|
||||
let bubble_inline_sizes = BubbleISizes { layout_context: &layout_context };
|
||||
|
@ -85,5 +85,5 @@ pub fn build_display_list_for_subtree(root: &mut FlowRef,
|
|||
let compute_absolute_positions = ComputeAbsolutePositions { layout_context: &layout_context };
|
||||
let build_display_list = BuildDisplayList { layout_context: &layout_context };
|
||||
|
||||
doit(root.get_mut(), compute_absolute_positions, build_display_list);
|
||||
doit(root.deref_mut(), compute_absolute_positions, build_display_list);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue