diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-10 21:50:09 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-10 21:50:09 +0100 |
commit | 3214dd52dd144c99353830d7340ea158e262b06f (patch) | |
tree | 888445068edb26084f32961c210da4a4c38240cf /src/api | |
parent | af7600f989d79d07253405647973828435f9d16c (diff) | |
download | garage-3214dd52dd144c99353830d7340ea158e262b06f.tar.gz garage-3214dd52dd144c99353830d7340ea158e262b06f.zip |
Very minor changes
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/s3_put.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/api/s3_put.rs b/src/api/s3_put.rs index 7aec12ed..2c5e364f 100644 --- a/src/api/s3_put.rs +++ b/src/api/s3_put.rs @@ -411,7 +411,9 @@ pub async fn handle_put_part( // Store part etag in version let data_md5sum_hex = hex::encode(data_md5sum); let mut version = version; - version.parts_etags.put(part_number, data_md5sum_hex.clone()); + version + .parts_etags + .put(part_number, data_md5sum_hex.clone()); garage.version_table.insert(&version).await?; let response = Response::builder() @@ -495,11 +497,7 @@ pub async fn handle_complete_multipart_upload( for (_, etag) in version.parts_etags.items().iter() { etag_md5_hasher.update(etag.as_bytes()); } - let etag = format!( - "{}-{}", - hex::encode(etag_md5_hasher.finalize()), - num_parts - ); + let etag = format!("{}-{}", hex::encode(etag_md5_hasher.finalize()), num_parts); // Calculate total size of final object let total_size = version |