chore: address Rust 1.85.0 clippy lints (#7376)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Gaurav Rawat
2025-03-05 15:25:40 +05:30
committed by GitHub
parent a1691d1b85
commit 38bb7676be
16 changed files with 37 additions and 55 deletions

View File

@ -283,11 +283,7 @@ impl TryFrom<StripePaymentIntentRequest> for payments::PaymentsRequest {
type Error = error_stack::Report<errors::ApiErrorResponse>;
fn try_from(item: StripePaymentIntentRequest) -> errors::RouterResult<Self> {
let routable_connector: Option<api_enums::RoutableConnectors> =
item.connector.and_then(|v| {
v.into_iter()
.next()
.map(api_enums::RoutableConnectors::from)
});
item.connector.and_then(|v| v.into_iter().next());
let routing = routable_connector
.map(|connector| {

View File

@ -179,11 +179,7 @@ impl TryFrom<StripeSetupIntentRequest> for payments::PaymentsRequest {
type Error = error_stack::Report<errors::ApiErrorResponse>;
fn try_from(item: StripeSetupIntentRequest) -> errors::RouterResult<Self> {
let routable_connector: Option<api_enums::RoutableConnectors> =
item.connector.and_then(|v| {
v.into_iter()
.next()
.map(api_enums::RoutableConnectors::from)
});
item.connector.and_then(|v| v.into_iter().next());
let routing = routable_connector
.map(|connector| {