diff options
author | 2022-10-04 11:53:03 +0200 | |
---|---|---|
committer | 2022-10-04 11:53:03 +0200 | |
commit | 8c74464b0d608fb04a1c921b2cbb36b8bc6fc9b8 (patch) | |
tree | 40093c0f59136426a04effa417f74bc64359c09b /examples/game_of_life | |
parent | ce2c795bdaca5709fa338f42b9f1c230372bbbbf (diff) | |
download | iced-8c74464b0d608fb04a1c921b2cbb36b8bc6fc9b8.tar.gz iced-8c74464b0d608fb04a1c921b2cbb36b8bc6fc9b8.tar.bz2 iced-8c74464b0d608fb04a1c921b2cbb36b8bc6fc9b8.zip |
Fix `clippy` lints
Diffstat (limited to 'examples/game_of_life')
-rw-r--r-- | examples/game_of_life/src/main.rs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index 971ad4d7..2a8b3721 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -424,22 +424,19 @@ mod grid { }; match event { - Event::Touch(touch_event) => match touch_event { - touch::Event::FingerMoved { .. } => { - let message = { - *interaction = if is_populated { - Interaction::Erasing - } else { - Interaction::Drawing - }; - - populate.or(unpopulate) + Event::Touch(touch::Event::FingerMoved { .. }) => { + let message = { + *interaction = if is_populated { + Interaction::Erasing + } else { + Interaction::Drawing }; - (event::Status::Captured, message) - } - _ => (event::Status::Ignored, None), - }, + populate.or(unpopulate) + }; + + (event::Status::Captured, message) + } Event::Mouse(mouse_event) => match mouse_event { mouse::Event::ButtonPressed(button) => { let message = match button { |