From 3a919d307ad396569313887e0500127964773199 Mon Sep 17 00:00:00 2001 From: Jorge Hermo Date: Tue, 5 Nov 2024 00:00:50 +0100 Subject: [PATCH] fix: clippy lints --- core/src/services/gcs/core.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/services/gcs/core.rs b/core/src/services/gcs/core.rs index a1683c9ed13..255c3f906f3 100644 --- a/core/src/services/gcs/core.rs +++ b/core/src/services/gcs/core.rs @@ -247,12 +247,12 @@ impl GcsCore { ) -> Result> { let p = build_abs_path(&self.root, path); - let mut request_metadata = InsertRequestMetadata::default(); - - request_metadata.storage_class = self.default_storage_class.as_ref().map(String::as_str); - request_metadata.cache_control = op.cache_control(); - request_metadata.content_type = op.content_type(); - request_metadata.metadata = op.user_metadata(); + let mut request_metadata = InsertRequestMetadata { + storage_class: self.default_storage_class.as_deref(), + cache_control: op.cache_control(), + content_type: op.content_type(), + metadata: op.user_metadata(), + }; let mut url = format!( "{}/upload/storage/v1/b/{}/o?uploadType={}&name={}", @@ -610,7 +610,7 @@ impl GcsCore { } } -#[derive(Debug, Serialize, Default)] +#[derive(Debug, Serialize)] #[serde(default, rename_all = "camelCase")] pub struct InsertRequestMetadata<'a> { #[serde(skip_serializing_if = "Option::is_none")]