diff options
| author | 2024-06-14 01:47:39 +0200 | |
|---|---|---|
| committer | 2024-06-14 01:47:39 +0200 | |
| commit | a25b1af45690bdd8e1cbb20ee3a5b1c4342de455 (patch) | |
| tree | 432044cf682dd73d1019a2f964749e78db178865 /examples/visible_bounds/src | |
| parent | e6d0b3bda5042a1017a5944a5227c97e0ed6caf9 (diff) | |
| download | iced-a25b1af45690bdd8e1cbb20ee3a5b1c4342de455.tar.gz iced-a25b1af45690bdd8e1cbb20ee3a5b1c4342de455.tar.bz2 iced-a25b1af45690bdd8e1cbb20ee3a5b1c4342de455.zip | |
Replace `Command` with a new `Task` API with chain support
Diffstat (limited to '')
| -rw-r--r-- | examples/visible_bounds/src/main.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/visible_bounds/src/main.rs b/examples/visible_bounds/src/main.rs index 8030f5b4..b43c0cca 100644 --- a/examples/visible_bounds/src/main.rs +++ b/examples/visible_bounds/src/main.rs @@ -5,8 +5,8 @@ use iced::widget::{ }; use iced::window; use iced::{ - Alignment, Color, Command, Element, Font, Length, Point, Rectangle, - Subscription, Theme, + Alignment, Color, Element, Font, Length, Point, Rectangle, Subscription, + Task, Theme, }; pub fn main() -> iced::Result { @@ -33,14 +33,14 @@ enum Message { } impl Example { - fn update(&mut self, message: Message) -> Command<Message> { + fn update(&mut self, message: Message) -> Task<Message> { match message { Message::MouseMoved(position) => { self.mouse_position = Some(position); - Command::none() + Task::none() } - Message::Scrolled | Message::WindowResized => Command::batch(vec