aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_put.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-12 19:57:37 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-12 19:57:37 +0100
commitc475471e7a8e7544f2be490898f4249cf27a17e9 (patch)
tree41253eaaba21b7d38340f2eab0ada17eaae88e8a /src/api/s3_put.rs
parentf4aad8fe6e36fe05e05c88c322b99fc87d896578 (diff)
downloadgarage-c475471e7a8e7544f2be490898f4249cf27a17e9.tar.gz
garage-c475471e7a8e7544f2be490898f4249cf27a17e9.zip
Implement table gc, currently for block_ref and version only
Diffstat (limited to 'src/api/s3_put.rs')
-rw-r--r--src/api/s3_put.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/s3_put.rs b/src/api/s3_put.rs
index 17732ced..c1774d6b 100644
--- a/src/api/s3_put.rs
+++ b/src/api/s3_put.rs
@@ -225,9 +225,7 @@ async fn read_and_put_blocks(
let data_md5sum = md5hasher.finalize();
let data_sha256sum = sha256hasher.result();
- let mut hash = [0u8; 32];
- hash.copy_from_slice(&data_sha256sum[..]);
- let data_sha256sum = Hash::from(hash);
+ let data_sha256sum = Hash::try_from(&data_sha256sum[..]).unwrap();
Ok((total_size, data_md5sum, data_sha256sum))
}