summaryrefslogtreecommitdiffstats
path: root/examples/game_of_life
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-12-20 11:31:25 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-12-20 11:31:25 +0100
commit6bb01b727611b83592f96b2b89371a12e7ce54d8 (patch)
treec75ba7d21b0bec1f5000b6e4ababff923d09387c /examples/game_of_life
parente0c728c62c6fd9496de1d442e7476e24fc5e9023 (diff)
downloadiced-6bb01b727611b83592f96b2b89371a12e7ce54d8.tar.gz
iced-6bb01b727611b83592f96b2b89371a12e7ce54d8.tar.bz2
iced-6bb01b727611b83592f96b2b89371a12e7ce54d8.zip
Fix `clippy` lints for Rust 1.66
Diffstat (limited to 'examples/game_of_life')
-rw-r--r--examples/game_of_life/src/main.rs6
1 files changed, 4 insertions, 2 deletions
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) =