diff options
author | 2023-09-20 05:30:08 +0200 | |
---|---|---|
committer | 2023-09-20 05:30:08 +0200 | |
commit | f8f1a8634402a5eb4275ff0814d03a3104fea65a (patch) | |
tree | 5308dbe0dbdae527ac704dddbd64b0cbfbc29579 /examples/game_of_life/src | |
parent | 1019d1e518d8ffe760142ccd5ff33d077434c8b9 (diff) | |
download | iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.tar.gz iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.tar.bz2 iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.zip |
Fix `clippy::manual_let_else`
Diffstat (limited to 'examples/game_of_life/src')
-rw-r--r-- | examples/game_of_life/src/main.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index c774e769..96840143 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -406,12 +406,9 @@ mod grid { *interaction = Interaction::None; } - let cursor_position = - if let Some(position) = cursor.position_in(bounds) { - position - } else { - return (event::Status::Ignored, None); - }; + let Some(cursor_position) = cursor.position_in(bounds) else { + return (event::Status::Ignored, None); + }; let cell = Cell::at(self.project(cursor_position, bounds.size())); let is_populated = self.state.contains(&cell); |