summaryrefslogtreecommitdiffstats
path: root/examples/bezier_tool
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-20 05:30:08 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-20 05:30:08 +0200
commitf8f1a8634402a5eb4275ff0814d03a3104fea65a (patch)
tree5308dbe0dbdae527ac704dddbd64b0cbfbc29579 /examples/bezier_tool
parent1019d1e518d8ffe760142ccd5ff33d077434c8b9 (diff)
downloadiced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.tar.gz
iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.tar.bz2
iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.zip
Fix `clippy::manual_let_else`
Diffstat (limited to 'examples/bezier_tool')
-rw-r--r--examples/bezier_tool/src/main.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs
index 9e4bc49c..56cb23ba 100644
--- a/examples/bezier_tool/src/main.rs
+++ b/examples/bezier_tool/src/main.rs
@@ -100,12 +100,9 @@ mod bezier {
bounds: Rectangle,
cursor: mouse::Cursor,
) -> (event::Status, Option<Curve>) {
- 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);
+ };
match event {
Event::Mouse(mouse_event) => {