Fix warnings after latest rust upgrade (#33043)

This fixes various unused code warnings after the recent rust upgrade.
Some of the dead code is maintained, as it is quite likely that it will
be used in future changes.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2024-08-14 09:00:16 +02:00 committed by GitHub
parent 380348e4df
commit 6be99241c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 19 additions and 34 deletions

View file

@ -31,8 +31,6 @@ pub struct BackgroundPlacement {
pub clip_rect: Rect<Au>,
/// Rounded corners for the clip_rect.
pub clip_radii: BorderRadius,
/// Whether or not the background is fixed to the viewport.
pub fixed: bool,
}
/// Access element at index modulo the array length.
@ -170,17 +168,13 @@ pub fn placement(
border_radii,
);
let mut fixed = false;
let mut bounds = match bg_attachment {
BackgroundAttachment::Scroll => match bg_origin {
BackgroundOrigin::BorderBox => absolute_bounds,
BackgroundOrigin::PaddingBox => absolute_bounds.inner_rect(border),
BackgroundOrigin::ContentBox => absolute_bounds.inner_rect(border_padding),
},
BackgroundAttachment::Fixed => {
fixed = true;
Rect::new(Point2D::origin(), viewport_size)
},
BackgroundAttachment::Fixed => Rect::new(Point2D::origin(), viewport_size),
};
let mut tile_size = compute_background_image_size(bg_size, bounds.size, intrinsic_size);
@ -223,7 +217,6 @@ pub fn placement(
tile_spacing,
clip_rect,
clip_radii,
fixed,
})
}