mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
fix clippy warning (#32667)
This commit is contained in:
parent
c0105de82b
commit
044ab3eeab
5 changed files with 8 additions and 14 deletions
|
@ -712,7 +712,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
// is used).
|
||||
if let BackgroundMode::Extra(ref extra_backgrounds) = self.fragment.background_mode {
|
||||
for extra_background in extra_backgrounds {
|
||||
let positioning_area = extra_background.rect.clone();
|
||||
let positioning_area = extra_background.rect;
|
||||
let painter = BackgroundPainter {
|
||||
style: &extra_background.style,
|
||||
painting_area_override: None,
|
||||
|
|
|
@ -268,7 +268,7 @@ impl InlineFormattingContextBuilder {
|
|||
for identifier in self.inline_box_stack.iter() {
|
||||
new_builder.start_inline_box(
|
||||
self.inline_boxes
|
||||
.get(&identifier)
|
||||
.get(identifier)
|
||||
.borrow()
|
||||
.split_around_block(),
|
||||
);
|
||||
|
|
|
@ -1738,7 +1738,7 @@ impl InlineFormattingContext {
|
|||
|
||||
match item {
|
||||
InlineItem::StartInlineBox(identifier) => {
|
||||
ifc.start_inline_box(&*self.inline_boxes.get(identifier).borrow());
|
||||
ifc.start_inline_box(&self.inline_boxes.get(identifier).borrow());
|
||||
},
|
||||
InlineItem::EndInlineBox => ifc.finish_inline_box(),
|
||||
InlineItem::TextRun(run) => run.layout_into_line_items(&mut ifc),
|
||||
|
@ -2369,7 +2369,7 @@ struct ContentSizesComputation<'a> {
|
|||
impl<'a> ContentSizesComputation<'a> {
|
||||
fn traverse(mut self, inline_formatting_context: &InlineFormattingContext) -> ContentSizes {
|
||||
for inline_item in inline_formatting_context.inline_items.iter() {
|
||||
self.process_item(&mut *inline_item.borrow_mut(), inline_formatting_context);
|
||||
self.process_item(&mut inline_item.borrow_mut(), inline_formatting_context);
|
||||
}
|
||||
|
||||
self.forced_line_break();
|
||||
|
|
|
@ -376,11 +376,6 @@ impl BoxFragment {
|
|||
(content_rect.origin.x, cb_width - content_rect.max_x())
|
||||
};
|
||||
|
||||
convert_to_length_or_auto(PhysicalSides::new(
|
||||
top.into(),
|
||||
right.into(),
|
||||
bottom.into(),
|
||||
left.into(),
|
||||
))
|
||||
convert_to_length_or_auto(PhysicalSides::new(top, right, bottom, left))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -632,10 +632,9 @@ impl HoistedAbsolutelyPositionedBox {
|
|||
|
||||
let (block_size, inline_size) =
|
||||
match independent_layout.content_inline_size_for_table {
|
||||
Some(inline_size) => (
|
||||
independent_layout.content_block_size.into(),
|
||||
inline_size.into(),
|
||||
),
|
||||
Some(inline_size) => {
|
||||
(independent_layout.content_block_size, inline_size)
|
||||
},
|
||||
None => (
|
||||
size.auto_is(|| independent_layout.content_block_size),
|
||||
inline_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue