From 17a469d3dc1324bcbeba743fe3df3fede0a385f7 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 12 May 2021 13:08:14 +0200 Subject: 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 Signed-off-by: Matthias Beyer --- src/commands/source.rs | 4 ++-- 1 file 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::>() - .collect::>(); + .collect::>>(); 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( -- cgit v1.2.3