diff options
author | 2023-06-08 20:16:46 +0200 | |
---|---|---|
committer | 2023-06-08 20:16:46 +0200 | |
commit | 5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28 (patch) | |
tree | b4f6ae33729d3ddc0d8c529a54f401fec305f00a /examples/sierpinski_triangle | |
parent | 34451bff185d8875f55747ee97ed746828e30f40 (diff) | |
download | iced-5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28.tar.gz iced-5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28.tar.bz2 iced-5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28.zip |
Take `Rectangle` by value in `Cursor` API
Diffstat (limited to 'examples/sierpinski_triangle')
-rw-r--r-- | examples/sierpinski_triangle/src/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/sierpinski_triangle/src/main.rs b/examples/sierpinski_triangle/src/main.rs index ad681a91..885d3c63 100644 --- a/examples/sierpinski_triangle/src/main.rs +++ b/examples/sierpinski_triangle/src/main.rs @@ -108,12 +108,12 @@ impl canvas::Program<Message> for SierpinskiGraph { bounds: Rectangle, cursor: mouse::Cursor, ) -> (event::Status, Option<Message>) { - let cursor_position = - if let Some(position) = cursor.position_in(&bounds) { - position - } else { - return (event::Status::Ignored, None); - }; + let cursor_position = if let Some(position) = cursor.position_in(bounds) + { + position + } else { + return (event::Status::Ignored, None); + }; match event { Event::Mouse(mouse_event) => { |