From c6cde1f1437a6cab90b22df6fe0641e5ad34c287 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 20 Oct 2023 13:20:47 +0200 Subject: remove now-unused key parameter in check_quotas --- src/api/s3/multipart.rs | 2 +- src/api/s3/put.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/api') diff --git a/src/api/s3/multipart.rs b/src/api/s3/multipart.rs index 978ad9cf..672ab198 100644 --- a/src/api/s3/multipart.rs +++ b/src/api/s3/multipart.rs @@ -332,7 +332,7 @@ pub async fn handle_complete_multipart_upload( // Calculate total size of final object let total_size = parts.iter().map(|x| x.size.unwrap()).sum(); - if let Err(e) = check_quotas(&garage, bucket, &key, total_size, Some(&object)).await { + if let Err(e) = check_quotas(&garage, bucket, total_size, Some(&object)).await { object_version.state = ObjectVersionState::Aborted; let final_object = Object::new(bucket.id, key.clone(), vec![object_version]); garage.object_table.insert(&final_object).await?; diff --git a/src/api/s3/put.rs b/src/api/s3/put.rs index a3fe9cca..62a1f76a 100644 --- a/src/api/s3/put.rs +++ b/src/api/s3/put.rs @@ -110,7 +110,7 @@ pub(crate) async fn save_stream> + Unpin>( content_sha256, )?; - check_quotas(&garage, bucket, key, size, existing_object.as_ref()).await?; + check_quotas(&garage, bucket, size, existing_object.as_ref()).await?; let object_version = ObjectVersion { uuid: version_uuid, @@ -189,7 +189,7 @@ pub(crate) async fn save_stream> + Unpin>( content_sha256, )?; - check_quotas(&garage, bucket, key, total_size, existing_object.as_ref()).await?; + check_quotas(&garage, bucket, total_size, existing_object.as_ref()).await?; // Save final object state, marked as Complete let md5sum_hex = hex::encode(data_md5sum); @@ -242,7 +242,6 @@ pub(crate) fn ensure_checksum_matches( pub(crate) async fn check_quotas( garage: &Arc, bucket: &Bucket, - key: &str, size: u64, prev_object: Option<&Object>, ) -> Result<(), Error> { -- cgit v1.2.3