From ae339bc619d90c94c62c3f566434a70468a32446 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 11 Nov 2021 20:42:49 +0200 Subject: fix: wait on async operation where required Sponsored-by: author --- src/bin/summain.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/summain.rs b/src/bin/summain.rs index 5031006..58d8788 100644 --- a/src/bin/summain.rs +++ b/src/bin/summain.rs @@ -19,7 +19,7 @@ async fn main() -> anyhow::Result<()> { let mut handles = vec![]; for filename in opt.pathnames.iter().cloned() { - handles.push(tokio::spawn(async move { manifest(filename) })); + handles.push(tokio::spawn(async move { manifest(filename).await })); } // Compute checksums for regular files. @@ -29,7 +29,7 @@ async fn main() -> anyhow::Result<()> { let mut sumhandles = vec![]; for h in handles { - let mut m: ManifestEntry = h.await?.await?; + let mut m: ManifestEntry = h.await??; let h = tokio::task::spawn_blocking(move || match m.compute_checksum() { Err(e) => Err(e), Ok(_) => Ok(m), -- cgit v1.2.1