summaryrefslogtreecommitdiffstats
path: root/examples/integration
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-14 01:47:39 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-14 01:47:39 +0200
commita25b1af45690bdd8e1cbb20ee3a5b1c4342de455 (patch)
tree432044cf682dd73d1019a2f964749e78db178865 /examples/integration
parente6d0b3bda5042a1017a5944a5227c97e0ed6caf9 (diff)
downloadiced-a25b1af45690bdd8e1cbb20ee3a5b1c4342de455.tar.gz
iced-a25b1af45690bdd8e1cbb20ee3a5b1c4342de455.tar.bz2
iced-a25b1af45690bdd8e1cbb20ee3a5b1c4342de455.zip
Replace `Command` with a new `Task` API with chain support
Diffstat (limited to 'examples/integration')
-rw-r--r--examples/integration/src/controls.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/integration/src/controls.rs b/examples/integration/src/controls.rs
index 1958b2f3..d0654996 100644
--- a/examples/integration/src/controls.rs
+++ b/examples/integration/src/controls.rs
@@ -2,7 +2,7 @@ use iced_wgpu::Renderer;
use iced_widget::{column, container, row, slider, text, text_input};
use iced_winit::core::alignment;
use iced_winit::core::{Color, Element, Length, Theme};
-use iced_winit::runtime::{Command, Program};
+use iced_winit::runtime::{Program, Task};
pub struct Controls {
background_color: Color,
@@ -33,7 +33,7 @@ impl Program for Controls {
type Message = Message;
type Renderer = Renderer;
- fn update(&mut self, message: Message) -> Command<Message> {
+ fn update(&mut self, message: Message) -> Task<Message> {
match message {
Message::BackgroundColorChanged(color) => {
self.background_color = color;
@@ -43,7 +43,7 @@ impl Program for Controls {
}
}
- Command::none()
+ Task::none()
}
fn view(&self) -> Element<Message, Theme, Renderer> {