diff options
author | tanishka <109246904+taniishkaaa@users.noreply.github.com> | 2024-10-03 16:25:30 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 10:55:30 +0000 |
commit | cd803c83419fe90960eac4dfefec062202837ad8 (patch) | |
tree | 8b5299ccac66f1ccdad72fb96fc07238b6cda810 | |
parent | 163e47766841725201f683495f4506f35fc9614c (diff) | |
download | servo-cd803c83419fe90960eac4dfefec062202837ad8.tar.gz servo-cd803c83419fe90960eac4dfefec062202837ad8.zip |
clippy: Fix warning in components/compositing (#33625)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
-rw-r--r-- | components/compositing/compositor.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 7d2206c7ffc..db94d658760 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -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(); } |