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:
Clark Gaebel 2014-10-15 10:57:25 -07:00
parent afc144aa39
commit 76ed7484eb
10 changed files with 76 additions and 74 deletions

View file

@ -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);
}