summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-11-11 20:42:49 +0200
committerLars Wirzenius <liw@liw.fi>2021-11-11 20:42:49 +0200
commitae339bc619d90c94c62c3f566434a70468a32446 (patch)
tree422320c36a2c2c96d2eff0899f3683095480f99f
parent8cbeaca3b535da21e1152aec9726109474899a6a (diff)
downloadsummain-rs-ae339bc619d90c94c62c3f566434a70468a32446.tar.gz
fix: wait on async operation where required
Sponsored-by: author
-rw-r--r--src/bin/summain.rs4
1 files 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),