summaryrefslogtreecommitdiffstats
path: root/examples/download_progress
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-11 03:39:42 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-11 03:41:29 +0100
commit0c528be2ea74f9aae1d4ac80b282ba9c16674649 (patch)
tree87108ca5917382a8e6a7d53968896f5ee1f7a617 /examples/download_progress
parent9f21eae1528fa414adbfb987ce4c851fa58326fe (diff)
downloadiced-0c528be2ea74f9aae1d4ac80b282ba9c16674649.tar.gz
iced-0c528be2ea74f9aae1d4ac80b282ba9c16674649.tar.bz2
iced-0c528be2ea74f9aae1d4ac80b282ba9c16674649.zip
Introduce `with` helper and use `sipper` in `gallery` example
Diffstat (limited to 'examples/download_progress')
-rw-r--r--examples/download_progress/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/download_progress/src/main.rs b/examples/download_progress/src/main.rs
index cc7a7800..9b316f52 100644
--- a/examples/download_progress/src/main.rs
+++ b/examples/download_progress/src/main.rs
@@ -4,7 +4,7 @@ use download::download;
use iced::task;
use iced::widget::{button, center, column, progress_bar, text, Column};
-use iced::{Center, Element, Right, Task};
+use iced::{with, Center, Element, Right, Task};
pub fn main() -> iced::Result {
iced::application(
@@ -52,7 +52,7 @@ impl Example {
let task = download.start();
- task.map_with(index, Message::DownloadUpdated)
+ task.map(with(Message::DownloadUpdated, index))
}
Message::DownloadUpdated(id, update) => {
if let Some(download) =