diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-11-11 18:45:30 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-11-11 18:45:30 +0000 |
commit | f44c60f5ef043ed0a965ba4b937f0aacd8f94d45 (patch) | |
tree | 422320c36a2c2c96d2eff0899f3683095480f99f | |
parent | 8cbeaca3b535da21e1152aec9726109474899a6a (diff) | |
parent | ae339bc619d90c94c62c3f566434a70468a32446 (diff) | |
download | summain-rs-f44c60f5ef043ed0a965ba4b937f0aacd8f94d45.tar.gz |
Merge branch 'fix' into 'main'
fix: wait on async operation where required
See merge request larswirzenius/summain!28
-rw-r--r-- | src/bin/summain.rs | 4 |
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), |