clippy: fix warnings in components/compositing (#31987)

This commit is contained in:
Azhar Ismagulova 2024-04-03 18:19:15 +01:00 committed by GitHub
parent 3c249b0d5b
commit 03b752289e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -242,13 +242,13 @@ pub struct EmbedderCoordinates {
impl EmbedderCoordinates {
/// Get the unflipped viewport rectangle for use with the WebRender API.
pub fn get_viewport(&self) -> DeviceIntRect {
self.viewport.clone()
self.viewport
}
/// Flip the given rect.
/// This should be used when drawing directly to the framebuffer with OpenGL commands.
pub fn flip_rect(&self, rect: &DeviceIntRect) -> DeviceIntRect {
let mut result = rect.clone();
let mut result = *rect;
result.min.y = self.framebuffer.height - result.min.y - result.size().height;
result
}