aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/fragment_tree/box_fragment.rs
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2024-01-25 10:03:31 +0100
committerGitHub <noreply@github.com>2024-01-25 09:03:31 +0000
commit50f56affe35a5565f99226daeb29843246c32b69 (patch)
tree23a027edebdc2aae64bb37b4ecfd0f48639fa08c /components/layout_2020/fragment_tree/box_fragment.rs
parent886f6c58d4cd149fe3238d668bd2f9fd5db78071 (diff)
downloadservo-50f56affe35a5565f99226daeb29843246c32b69.tar.gz
servo-50f56affe35a5565f99226daeb29843246c32b69.zip
Lint layout_2020 with clippy (#31169)
cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
Diffstat (limited to 'components/layout_2020/fragment_tree/box_fragment.rs')
-rw-r--r--components/layout_2020/fragment_tree/box_fragment.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/components/layout_2020/fragment_tree/box_fragment.rs b/components/layout_2020/fragment_tree/box_fragment.rs
index f1acbd04d63..f689c646280 100644
--- a/components/layout_2020/fragment_tree/box_fragment.rs
+++ b/components/layout_2020/fragment_tree/box_fragment.rs
@@ -135,10 +135,7 @@ impl BoxFragment {
BoxFragment {
base: base_fragment_info.into(),
style,
- children: children
- .into_iter()
- .map(|fragment| ArcRefCell::new(fragment))
- .collect(),
+ children: children.into_iter().map(ArcRefCell::new).collect(),
content_rect,
padding,
border,
@@ -221,7 +218,7 @@ impl BoxFragment {
// https://www.w3.org/TR/css-overflow-3/#scrollable
// Only include the scrollable overflow of a child box if it has overflow: visible.
- let scrollable_overflow = self.scrollable_overflow(&containing_block);
+ let scrollable_overflow = self.scrollable_overflow(containing_block);
let bottom_right = PhysicalPoint::new(
overflow.max_x().max(scrollable_overflow.max_x()),
overflow.max_y().max(scrollable_overflow.max_y()),
@@ -254,7 +251,7 @@ impl BoxFragment {
let (cb_width, cb_height) = (containing_block.width(), containing_block.height());
let content_rect = self
.content_rect
- .to_physical(self.style.writing_mode, &containing_block);
+ .to_physical(self.style.writing_mode, containing_block);
if let Some(resolved_sticky_insets) = self.resolved_sticky_insets {
return resolved_sticky_insets;