From a339afaa4678b4e7f527691db5a77873151406a3 Mon Sep 17 00:00:00 2001 From: Simon Beal Date: Thu, 14 Nov 2024 10:59:48 +0000 Subject: [PATCH] Fix some typos Signed-off-by: Simon Beal --- mountpoint-s3/src/data_cache/express_data_cache.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mountpoint-s3/src/data_cache/express_data_cache.rs b/mountpoint-s3/src/data_cache/express_data_cache.rs index 86ef67d69..73f81c800 100644 --- a/mountpoint-s3/src/data_cache/express_data_cache.rs +++ b/mountpoint-s3/src/data_cache/express_data_cache.rs @@ -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()), @@ -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) -> Result<(), DataCacheError> { self.validate_header(headers, "cache-version", |version| version == CACHE_VERSION)?; self.validate_header(headers, "block-idx", |block_idx| {