Remove redundant .clone()s

This commit is contained in:
Shotaro Yamada 2018-12-11 10:43:51 +09:00
parent eeaca0b26d
commit c44a2febe6
19 changed files with 31 additions and 35 deletions

View file

@ -1257,7 +1257,7 @@ impl BlockFlow {
self.fragment.inline_start_offset(),
Au(0),
));
self.base.floats = floats.clone();
self.base.floats = floats;
self.adjust_fragments_for_collapsed_margins_if_root(layout_context.shared_context());
} else {
// We don't need to reflow, but we still need to perform in-order traversals if

View file

@ -2288,7 +2288,7 @@ impl FragmentDisplayListBuilding for Fragment {
// Pop all the PushTextShadows
if !text_shadows.is_empty() {
state.add_display_item(DisplayItem::PopAllTextShadows(Box::new(
PopAllTextShadowsDisplayItem { base: base.clone() },
PopAllTextShadowsDisplayItem { base },
)));
}
}

View file

@ -1660,7 +1660,7 @@ impl Flow for InlineFlow {
None => Au(0),
};
self.base.floats = scanner.floats.clone();
self.base.floats = scanner.floats;
let writing_mode = self.base.floats.writing_mode;
self.base.floats.translate(LogicalSize::new(
writing_mode,