You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run it in a separate task, but I'm running into this problem:
error: implementation of `Iterator` is not general enough
--> src/pages/download.rs:128:25
|
128 | / task::spawn(async move {
129 | | let summaries = downloader.download(&downloads.to_vec()).await;
130 | |
131 | | display_summary(&summaries);
132 | | });
| |__________________________^ implementation of `Iterator` is not general enough
|
= note: `Iterator` would have to be implemented for the type `std::slice::Iter<'0, Download>`, for any lifetime `'0`...
= note: ...but `Iterator` is actually implemented for the type `std::slice::Iter<'1, Download>`, for some specific lifetime `'1`
let cloned_files_url:Vec<HashMap<String,String>> = files_url.clone();letmut downloads = vec![];for f in cloned_files_url {let url = f.get("url").unwrap();//let file_name = f.get("name").unwrap(); // nome do arquivolet d = Download::try_from(url.as_str()).unwrap();
downloads.push(d);}let downloader = DownloaderBuilder::new().directory(PathBuf::from("output")).build();
task::spawn(asyncmove{let summaries = downloader.download(&downloads.to_vec()).await;display_summary(&summaries);});
trauma = "2.2.4"
tokio = "1.36.0"
The text was updated successfully, but these errors were encountered:
I'm trying to run it in a separate task, but I'm running into this problem:
trauma = "2.2.4"
tokio = "1.36.0"
The text was updated successfully, but these errors were encountered: