From 875cbce45c9ca7c646d768884101b0bdd5309606 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 (cherry picked from commit 17a469d3dc1324bcbeba743fe3df3fede0a385f7) --- 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 f29ce84..5c118e5 100644 --- a/src/commands/source.rs +++ b/src/commands/source.rs @@ -306,9 +306,9 @@ 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() } -- cgit v1.2.3