From 2cbe7572fa94c56deaccc540c7c854411e1bfcb3 Mon Sep 17 00:00:00 2001 From: Chethan Date: Wed, 22 Nov 2023 00:32:50 +0530 Subject: [PATCH] chore: address Rust 1.74 clippy lints --- crates/router/src/configs/defaults.rs | 4 ++-- crates/router/src/connector/powertranz/transformers.rs | 4 ++-- crates/router/src/core/payment_methods/cards.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/router/src/configs/defaults.rs b/crates/router/src/configs/defaults.rs index b71e2aad5b5d..a0da9c88ef35 100644 --- a/crates/router/src/configs/defaults.rs +++ b/crates/router/src/configs/defaults.rs @@ -4356,8 +4356,8 @@ impl Default for super::settings::ApiKeys { #[cfg(feature = "kms")] kms_encrypted_hash_key: KmsValue::default(), - /// Hex-encoded 32-byte long (64 characters long when hex-encoded) key used for calculating - /// hashes of API keys + // Hex-encoded 32-byte long (64 characters long when hex-encoded) key used for calculating + // hashes of API keys #[cfg(not(feature = "kms"))] hash_key: String::new(), diff --git a/crates/router/src/connector/powertranz/transformers.rs b/crates/router/src/connector/powertranz/transformers.rs index 83bca662ec21..5a8c49bd8ee1 100644 --- a/crates/router/src/connector/powertranz/transformers.rs +++ b/crates/router/src/connector/powertranz/transformers.rs @@ -150,8 +150,8 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for ExtendedData { fn try_from(item: &types::PaymentsAuthorizeRouterData) -> Result { Ok(Self { three_d_secure: ThreeDSecure { - /// Merchants preferred sized of challenge window presented to cardholder. - /// 5 maps to 100% of challenge window size + // Merchants preferred sized of challenge window presented to cardholder. + // 5 maps to 100% of challenge window size challenge_window_size: 5, }, merchant_response_url: item.request.get_complete_authorize_url()?, diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs index ad42a8579127..60fd3f315ea6 100644 --- a/crates/router/src/core/payment_methods/cards.rs +++ b/crates/router/src/core/payment_methods/cards.rs @@ -156,7 +156,7 @@ pub async fn add_payment_method( .await?; } - Ok(resp).map(services::ApplicationResponse::Json) + Ok(services::ApplicationResponse::Json(resp)) } #[instrument(skip_all)]