mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
chore: address Rust 1.81.0 clippy lints (#5832)
This commit is contained in:
@ -1017,11 +1017,12 @@ impl api::IncomingWebhook for Globalpay {
|
||||
&self,
|
||||
request: &api::IncomingWebhookRequestDetails<'_>,
|
||||
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
|
||||
let details = std::str::from_utf8(request.body)
|
||||
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
|
||||
Ok(Box::new(serde_json::from_str(details).change_context(
|
||||
errors::ConnectorError::WebhookResourceObjectNotFound,
|
||||
)?))
|
||||
Ok(Box::new(
|
||||
request
|
||||
.body
|
||||
.parse_struct::<GlobalpayPaymentsResponse>("GlobalpayPaymentsResponse")
|
||||
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ impl HealthCheckInterface for app::SessionState {
|
||||
logger::debug!("Redis set_key was successful");
|
||||
|
||||
redis_conn
|
||||
.get_key("test_key")
|
||||
.get_key::<()>("test_key")
|
||||
.await
|
||||
.change_context(errors::HealthCheckRedisError::GetFailed)?;
|
||||
|
||||
|
||||
@ -88,11 +88,10 @@ impl SurchargeSource {
|
||||
)
|
||||
})
|
||||
.transpose()?
|
||||
.map(|surcharge_details| {
|
||||
.inspect(|surcharge_details| {
|
||||
let (surcharge_metadata, surcharge_key) = surcharge_metadata_and_key;
|
||||
surcharge_metadata
|
||||
.insert_surcharge_details(surcharge_key, surcharge_details.clone());
|
||||
surcharge_details
|
||||
}))
|
||||
}
|
||||
Self::Predetermined(request_surcharge_details) => Ok(Some(
|
||||
|
||||
@ -145,7 +145,7 @@ where
|
||||
.to_validate_request()?
|
||||
.validate_request(&req, &merchant_account)?;
|
||||
|
||||
tracing::Span::current().record("payment_id", &format!("{}", validate_result.payment_id));
|
||||
tracing::Span::current().record("payment_id", format!("{}", validate_result.payment_id));
|
||||
|
||||
let operations::GetTrackerResponse {
|
||||
operation,
|
||||
|
||||
Reference in New Issue
Block a user