Skip to content

Commit

Permalink
compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
avantgardnerio committed Dec 8, 2024
1 parent 0d0c938 commit d655774
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions object_store/src/aws/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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())
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions object_store/src/client/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ impl From<Vec<PartId>> 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();
Expand Down

0 comments on commit d655774

Please sign in to comment.