diff options
author | Peter Mikola <mikopet@mikopet.dev> | 2024-06-12 19:09:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 17:09:56 +0000 |
commit | 0a641816bf8f402800d7ecec12d2d64505975c16 (patch) | |
tree | cbd4d66d6ffa52903cdf21679c3e0c3ec4bfef94 /components/layout | |
parent | fd472ebd0edc8eb91155b20e95ea9acfa6e77573 (diff) | |
download | servo-0a641816bf8f402800d7ecec12d2d64505975c16.tar.gz servo-0a641816bf8f402800d7ecec12d2d64505975c16.zip |
clippy fixes regarding clone_from (#32482)
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/table.rs | 7 | ||||
-rw-r--r-- | components/layout/table_row.rs | 4 | ||||
-rw-r--r-- | components/layout/table_wrapper.rs | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/components/layout/table.rs b/components/layout/table.rs index 55f19c05867..b91e77966ee 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -823,10 +823,9 @@ fn perform_border_collapse_for_row( // Compute block-start borders. let block_start_borders = &mut child_table_row.final_collapsed_borders.block_start; - *block_start_borders = child_table_row - .preliminary_collapsed_borders - .block_start - .clone(); + + block_start_borders.clone_from(&child_table_row.preliminary_collapsed_borders.block_start); + for (i, this_border) in block_start_borders.iter_mut().enumerate() { match previous_block_borders { PreviousBlockCollapsedBorders::FromPreviousRow(ref previous_block_borders) => { diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs index 21aee72bba5..49ff3f2b5c1 100644 --- a/components/layout/table_row.rs +++ b/components/layout/table_row.rs @@ -944,7 +944,9 @@ pub fn propagate_column_inline_sizes_to_child( column_computed_inline_sizes.to_vec(); child_table_row_flow.spacing = *border_spacing; child_table_row_flow.table_writing_mode = table_writing_mode; - child_table_row_flow.incoming_rowspan = incoming_rowspan.clone(); + child_table_row_flow + .incoming_rowspan + .clone_from(incoming_rowspan); // Update the incoming rowspan for the next row. let mut col = 0; diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs index 3d5bc557561..26ff771e61b 100644 --- a/components/layout/table_wrapper.rs +++ b/components/layout/table_wrapper.rs @@ -360,7 +360,8 @@ impl Flow for TableWrapperFlow { debug_assert!(kid.is_table_caption() || kid.is_table()); if kid.is_table() { let table = kid.as_table(); - self.column_intrinsic_inline_sizes = table.column_intrinsic_inline_sizes.clone(); + self.column_intrinsic_inline_sizes + .clone_from(&table.column_intrinsic_inline_sizes) } } |