Skip to content

Commit

Permalink
refactor: use Default derive
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgehermo9 committed Nov 4, 2024
1 parent d7af0ca commit de8e57a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions core/src/services/gcs/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ impl GcsCore {
}
}

#[derive(Debug, Serialize)]
#[derive(Debug, Serialize, Default)]
#[serde(default, rename_all = "camelCase")]
pub struct InsertRequestMetadata<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -623,17 +623,6 @@ pub struct InsertRequestMetadata<'a> {
metadata: Option<&'a HashMap<String, String>>,
}

impl Default for InsertRequestMetadata<'_> {
fn default() -> Self {
Self {
content_type: None,
storage_class: None,
cache_control: None,
metadata: None,
}
}
}

impl InsertRequestMetadata<'_> {
pub fn is_empty(&self) -> bool {
self.content_type.is_none()
Expand Down

0 comments on commit de8e57a

Please sign in to comment.