From 0c528be2ea74f9aae1d4ac80b282ba9c16674649 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 11 Feb 2025 03:39:42 +0100 Subject: Introduce `with` helper and use `sipper` in `gallery` example --- examples/download_progress/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/download_progress') 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) = -- cgit