clippy: Fix warning in components/compositing (#33625)

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-03 16:25:30 +05:30 committed by GitHub
parent 163e477668
commit cd803c8341
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1914,11 +1914,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
return;
}
self.page_zoom = Scale::new(
(self.page_zoom.get() * magnification)
.max(MIN_ZOOM)
.min(MAX_ZOOM),
);
self.page_zoom =
Scale::new((self.page_zoom.get() * magnification).clamp(MIN_ZOOM, MAX_ZOOM));
self.update_after_zoom_or_hidpi_change();
}