From 6bb01b727611b83592f96b2b89371a12e7ce54d8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 20 Dec 2022 11:31:25 +0100 Subject: Fix `clippy` lints for Rust 1.66 --- examples/game_of_life/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/game_of_life/src') diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index 2a8b3721..b0f1c96d 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -492,8 +492,10 @@ mod grid { let old_scaling = self.scaling; let scaling = (self.scaling * (1.0 + y / 30.0)) - .max(Self::MIN_SCALING) - .min(Self::MAX_SCALING); + .clamp( + Self::MIN_SCALING, + Self::MAX_SCALING, + ); let translation = if let Some(cursor_to_center) = -- cgit