diff options
author | 2025-02-11 10:36:45 +0100 | |
---|---|---|
committer | 2025-02-11 10:36:45 +0100 | |
commit | eab723866e1dc94ebd6d7c5c0c3ef191c80bcf59 (patch) | |
tree | 2b5a476f9da5155fd13e68957a9bbf3e3ab352a1 /examples/download_progress | |
parent | 080db348495f6e92f13391d3b222c5a2769b5fc1 (diff) | |
download | iced-eab723866e1dc94ebd6d7c5c0c3ef191c80bcf59.tar.gz iced-eab723866e1dc94ebd6d7c5c0c3ef191c80bcf59.tar.bz2 iced-eab723866e1dc94ebd6d7c5c0c3ef191c80bcf59.zip |
Replace `with` function with `Function` trait
Diffstat (limited to 'examples/download_progress')
-rw-r--r-- | examples/download_progress/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/download_progress/src/main.rs b/examples/download_progress/src/main.rs index 9b316f52..8082eccd 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::{with, Center, Element, Right, Task}; +use iced::{Center, Element, Function, Right, Task}; pub fn main() -> iced::Result { iced::application( @@ -52,7 +52,7 @@ impl Example { let task = download.start(); - task.map(with(Message::DownloadUpdated, index)) + task.map(Message::DownloadUpdated.with(index)) } Message::DownloadUpdated(id, update) => { if let Some(download) = |