diff options
| author | 2023-09-20 05:30:08 +0200 | |
|---|---|---|
| committer | 2023-09-20 05:30:08 +0200 | |
| commit | f8f1a8634402a5eb4275ff0814d03a3104fea65a (patch) | |
| tree | 5308dbe0dbdae527ac704dddbd64b0cbfbc29579 /examples/bezier_tool | |
| parent | 1019d1e518d8ffe760142ccd5ff33d077434c8b9 (diff) | |
| download | iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.tar.gz iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.tar.bz2 iced-f8f1a8634402a5eb4275ff0814d03a3104fea65a.zip | |
Fix `clippy::manual_let_else`
Diffstat (limited to '')
| -rw-r--r-- | examples/bezier_tool/src/main.rs | 9 | 
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) => { | 
