Introduce Task::map_with
This commit is contained in:
parent
06ece6a8c3
commit
9f21eae152
5 changed files with 55 additions and 11 deletions
|
|
@ -52,7 +52,7 @@ impl Example {
|
|||
|
||||
let task = download.start();
|
||||
|
||||
task.map(move |update| Message::DownloadUpdated(index, update))
|
||||
task.map_with(index, Message::DownloadUpdated)
|
||||
}
|
||||
Message::DownloadUpdated(id, update) => {
|
||||
if let Some(download) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue