diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-23 08:08:01 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-23 08:08:01 +0300 |
commit | aa5d21c8865837025c81e7e7b3648049262eecee (patch) | |
tree | 4b58dee5c3d51c7b5d59684a4017eccf866664a9 | |
parent | 486f5f69b6e2d10eafa44c28b93caa8454e48911 (diff) | |
download | summain-rs-aa5d21c8865837025c81e7e7b3648049262eecee.tar.gz |
async file_checksum
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -63,7 +63,7 @@ impl ManifestEntry { pub async fn new(path: &Path) -> std::io::Result<Self> { let m = symlink_metadata(path)?; let hash = if m.is_file() { - Some(file_checksum(path)?) + Some(file_checksum(path).await?) } else { None }; @@ -85,7 +85,7 @@ impl ManifestEntry { } } -fn file_checksum(path: &Path) -> std::io::Result<String> { +async fn file_checksum(path: &Path) -> std::io::Result<String> { let mut hasher = Sha256::new(); let file = File::open(path)?; |