From c72ebbcb7571ba58185a6b6ac8a7b837d3b1654a Mon Sep 17 00:00:00 2001 From: Lin Yinfeng Date: Fri, 11 Aug 2023 16:40:26 +0800 Subject: [PATCH] Higher-ranked lifetime error workaround Workaround to a known issue of rustc: https://github.com/rust-lang/rust/issues/104382 --- src/client.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client.rs b/src/client.rs index 20931e03..40d984e3 100644 --- a/src/client.rs +++ b/src/client.rs @@ -298,6 +298,7 @@ impl Client { )) } }) + .boxed() // Workaround to rustc issue https://github.com/rust-lang/rust/issues/104382 .buffer_unordered(self.config.max_concurrent_download) .try_collect() .await?; @@ -365,6 +366,7 @@ impl Client { Ok(()) } }) + .boxed() // Workaround to rustc issue https://github.com/rust-lang/rust/issues/104382 .buffer_unordered(self.config.max_concurrent_upload) .try_for_each(future::ok) .await?;