Lint layout_2020 with clippy (#31169)

cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
This commit is contained in:
Oriol Brufau 2024-01-25 10:03:31 +01:00 committed by GitHub
parent 886f6c58d4
commit 50f56affe3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 224 additions and 244 deletions

View file

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