Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Beal <simobeal@amazon.com>
  • Loading branch information
muddyfish committed Nov 14, 2024
1 parent db3d9a2 commit a339afa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mountpoint-s3/src/data_cache/express_data_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ impl BlockMetadata {
}
}

/// Convert to object metadata that is HTTP header safe (ASCII only)
/// Build parameters to be used when running a PutObject for this block
pub fn to_put_object_params(&self) -> PutObjectSingleParams {
// Convert to object metadata that is HTTP header safe (ASCII only)
let source_key_encoded = Base64::encode_string(self.source_key.as_bytes());
let object_metadata = HashMap::from([
("cache-version".to_string(), CACHE_VERSION.to_string()),
Expand All @@ -259,7 +260,7 @@ impl BlockMetadata {
.checksum(Some(UploadChecksum::Crc32c(Crc32c::new(self.data_checksum))))
}

/// Validate the object metadata headers received match this BlockHeader object.
/// Validate the object metadata headers received match this BlockMetadata object.
pub fn validate_object_metadata(&self, headers: &HashMap<String, String>) -> Result<(), DataCacheError> {
self.validate_header(headers, "cache-version", |version| version == CACHE_VERSION)?;
self.validate_header(headers, "block-idx", |block_idx| {
Expand Down

0 comments on commit a339afa

Please sign in to comment.