summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-05-12 13:08:14 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-05-12 14:24:23 +0200
commit17a469d3dc1324bcbeba743fe3df3fede0a385f7 (patch)
treec80937f564eb191ec7598d08a40e7ed5c648aa6c /src
parentd671ce91bd74a7f31c5d36d217fd61668da3d66b (diff)
Fix: Consume all items before failing
This patch changes the download implementation so that one failing download does not fail the whole process, but errors are collected instead and reported after all other downloads are finished. This is the simple case implementation where only one error is reported, though multiple could have happened. Tested-by: Matthias Beyer <matthias.beyer@atos.net> Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src')
-rw-r--r--src/commands/source.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/source.rs b/src/commands/source.rs
index 0fc1eac..c72cd08 100644
--- a/src/commands/source.rs
+++ b/src/commands/source.rs
@@ -304,11 +304,11 @@ pub async fn download(
})
.flatten()
.collect::<futures::stream::FuturesUnordered<_>>()
- .collect::<Result<()>>();
+ .collect::<Vec<Result<()>>>();
let multibar_block = tokio::task::spawn_blocking(move || multi.join());
let (r, _) = tokio::join!(r, multibar_block);
- r
+ r.into_iter().collect()
}
async fn of(