From 54fc54761fd3085ab2e333423352339d33c24f28 Mon Sep 17 00:00:00 2001 From: Brent Gardner Date: Sun, 8 Dec 2024 05:40:00 -0700 Subject: [PATCH] compile errors --- object_store/src/aws/client.rs | 11 +++++++---- object_store/src/client/s3.rs | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs index ede8b343271..81015e82b39 100644 --- a/object_store/src/aws/client.rs +++ b/object_store/src/aws/client.rs @@ -621,11 +621,11 @@ impl S3Client { if let Some(algorithm) = self.config.checksum { match algorithm { Checksum::SHA256 => { - reqquest = reqquest.header(ALGORITHM, "SHA256"); + request = request.header(ALGORITHM, "SHA256"); } } } - let response = reqquest + let response = request .query(&[("uploads", "")]) .with_encryption_headers() .with_attributes(opts.attributes) @@ -676,7 +676,7 @@ impl S3Client { request = request.with_encryption_headers(); } let response = request.send().await?; - let checksum = response + let checksum_sha256 = response .headers() .get(SHA256_CHECKSUM) .and_then(|v| v.to_str().ok()) @@ -696,7 +696,10 @@ impl S3Client { }; let content_id = if self.config.checksum == Some(Checksum::SHA256) { - let meta = PartMetadata { e_tag, checksum }; + let meta = PartMetadata { + e_tag, + checksum_sha256, + }; quick_xml::se::to_string(&meta).unwrap() } else { e_tag diff --git a/object_store/src/client/s3.rs b/object_store/src/client/s3.rs index a64c71d9d5f..7fe956b2376 100644 --- a/object_store/src/client/s3.rs +++ b/object_store/src/client/s3.rs @@ -124,13 +124,13 @@ impl From> for CompleteMultipartUpload { // fallback to old way Err(_) => PartMetadata { e_tag: part.content_id.clone(), - checksum: None, + checksum_sha256: None, }, }; MultipartPart { e_tag: md.e_tag, part_number: part_idx + 1, - checksum_sha256: md.checksum, + checksum_sha256: md.checksum_sha256, } }) .collect();