From df6c2782aa4d1892cfd1f8fc9f8f04d6cf4b353e Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 07:38:57 +0000 Subject: [PATCH] chore: run formatter --- crates/common_enums/src/enums.rs | 8 ++++++-- crates/router/src/connector/utils.rs | 12 ++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs index 12b99c778dc..74eb8c048f9 100644 --- a/crates/common_enums/src/enums.rs +++ b/crates/common_enums/src/enums.rs @@ -2010,7 +2010,9 @@ pub enum FileUploadProvider { Checkout, } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString)] +#[derive( + Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString, +)] pub enum UsStatesAbbreviation { AL, AK, @@ -2073,7 +2075,9 @@ pub enum UsStatesAbbreviation { WY, } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString)] +#[derive( + Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString, +)] pub enum CanadaStatesAbbreviation { AB, BC, diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs index f6c8eae8887..97611bf8fa1 100644 --- a/crates/router/src/connector/utils.rs +++ b/crates/router/src/connector/utils.rs @@ -1796,8 +1796,10 @@ pub fn get_webhook_merchant_secret_key(connector_label: &str, merchant_id: &str) impl ForeignTryFrom for UsStatesAbbreviation { type Error = error_stack::Report; fn foreign_try_from(value: String) -> Result { - let state_abbreviation_check = - StringExt::::parse_enum(value.to_uppercase().clone(), "UsStatesAbbreviation"); + let state_abbreviation_check = StringExt::::parse_enum( + value.to_uppercase().clone(), + "UsStatesAbbreviation", + ); match state_abbreviation_check { Ok(state_abbreviation) => Ok(state_abbreviation), @@ -1877,8 +1879,10 @@ impl ForeignTryFrom for UsStatesAbbreviation { impl ForeignTryFrom for CanadaStatesAbbreviation { type Error = error_stack::Report; fn foreign_try_from(value: String) -> Result { - let state_abbreviation_check = - StringExt::::parse_enum(value.to_uppercase().clone(), "CanadaStatesAbbreviation"); + let state_abbreviation_check = StringExt::::parse_enum( + value.to_uppercase().clone(), + "CanadaStatesAbbreviation", + ); match state_abbreviation_check { Ok(state_abbreviation) => Ok(state_abbreviation), Err(_) => {