From ef60ed9581c5238b431f7db91f2553f97dc3b87b Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 9 Dec 2024 19:38:06 -0600 Subject: [PATCH] Remove unlooping loop --- src/stream.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/stream.rs b/src/stream.rs index a83904f..52aba63 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -54,14 +54,12 @@ where pub async fn make_progress_with(&mut self, f: F) -> F::Output { let mut f = std::pin::pin!(f); - loop { - tokio::select! { - _ = self.make_progress() => { - return f.await; - } - output = &mut f => { - return output; - } + tokio::select! { + _ = self.make_progress() => { + return f.await; + } + output = &mut f => { + return output; } } }