chore: address Rust 1.88.0 clippy lints (#8498)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Chethan Rao
2025-07-02 12:13:07 +05:30
committed by GitHub
parent ad29631c53
commit 20b52f11c3
150 changed files with 464 additions and 647 deletions

View File

@ -728,8 +728,7 @@ impl WebhookDetails {
for status in statuses {
if !valid_statuses.contains(status) {
return Err(format!(
"Invalid {} webhook status provided: {:?}",
status_type_name, status
"Invalid {status_type_name} webhook status provided: {status:?}"
));
}
}

View File

@ -114,7 +114,7 @@ impl TryFrom<Connector> for PayoutConnectors {
Connector::Paypal => Ok(Self::Paypal),
Connector::Stripe => Ok(Self::Stripe),
Connector::Wise => Ok(Self::Wise),
_ => Err(format!("Invalid payout connector {}", value)),
_ => Err(format!("Invalid payout connector {value}")),
}
}
}

View File

@ -352,8 +352,7 @@ where
.map_err(|err| {
let err_msg = format!("{err:?}");
de::Error::custom(format_args!(
"Failed to deserialize PaymentsMandateReference `{}`",
err_msg
"Failed to deserialize PaymentsMandateReference `{err_msg}`",
))
})?;
@ -371,8 +370,7 @@ where
.map_err(|err| {
let err_msg = format!("{err:?}");
de::Error::custom(format_args!(
"Failed to deserialize CommonMandateReference `{}`",
err_msg
"Failed to deserialize CommonMandateReference `{err_msg}`",
))
})?
.flatten();
@ -2109,7 +2107,7 @@ pub struct CustomerPaymentMethodResponseItem {
#[schema(value_type = String, example = "12345_pm_01926c58bc6e77c09e809964e72af8c8")]
pub id: id_type::GlobalPaymentMethodId,
/// Temporary Token for payment method in vault which gets refreshed for every payment
/// Temporary Token for payment method in vault which gets refreshed for every payment
#[schema(example = "7ebf443f-a050-4067-84e5-e6f6d4800aef")]
pub payment_token: String,

View File

@ -224,7 +224,7 @@ impl std::fmt::Display for RoutableConnectorChoice {
if let Some(mca_id) = &self.merchant_connector_id {
return write!(f, "{}:{}", base, mca_id.get_string_repr());
}
write!(f, "{}", base)
write!(f, "{base}")
}
}