Skip to content

Commit fab9f5e

Browse files
chore: address Rust 1.87.0 clippy lints (#8130)
1 parent a654695 commit fab9f5e

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

crates/external_services/src/email/ses.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl SESConfig {
5454
pub enum AwsSesError {
5555
/// An error occurred in the SDK while sending email.
5656
#[error("Failed to Send Email {0:?}")]
57-
SendingFailure(aws_sdk_sesv2::error::SdkError<SendEmailError>),
57+
SendingFailure(Box<aws_sdk_sesv2::error::SdkError<SendEmailError>>),
5858

5959
/// Configuration variable is missing to construct the email client
6060
#[error("Missing configuration variable {0}")]
@@ -245,7 +245,7 @@ impl EmailClient for AwsSes {
245245
)
246246
.send()
247247
.await
248-
.map_err(AwsSesError::SendingFailure)
248+
.map_err(|e| AwsSesError::SendingFailure(Box::new(e)))
249249
.change_context(EmailError::EmailSendingFailure)?;
250250

251251
Ok(())

crates/kgraph_utils/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub enum KgraphError {
1414
#[error("There was an error constructing the graph: {0}")]
1515
GraphConstructionError(hyperswitch_constraint_graph::GraphError<dir::DirValue>),
1616
#[error("There was an error constructing the context")]
17-
ContextConstructionError(AnalysisErrorType),
17+
ContextConstructionError(Box<AnalysisErrorType>),
1818
#[error("there was an unprecedented indexing error")]
1919
IndexingError,
2020
}

crates/kgraph_utils/src/transformers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
168168
| api_enums::PaymentMethod::Voucher
169169
| api_enums::PaymentMethod::OpenBanking
170170
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
171-
AnalysisErrorType::NotSupported,
171+
Box::new(AnalysisErrorType::NotSupported),
172172
)),
173173
},
174174
api_enums::PaymentMethodType::Bacs => match self.1 {
@@ -187,7 +187,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
187187
| api_enums::PaymentMethod::Voucher
188188
| api_enums::PaymentMethod::OpenBanking
189189
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
190-
AnalysisErrorType::NotSupported,
190+
Box::new(AnalysisErrorType::NotSupported),
191191
)),
192192
},
193193
api_enums::PaymentMethodType::Becs => Ok(dirval!(BankDebitType = Becs)),

crates/masking/src/serde.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use crate::{Secret, Strategy, StrongSecret, ZeroizableSecret};
1515
///
1616
/// This is done deliberately to prevent accidental exfiltration of secrets
1717
/// via `serde` serialization.
18-
1918
#[cfg_attr(docsrs, cfg(feature = "serde"))]
2019
pub trait SerializableSecret: Serialize {}
2120
// #[cfg_attr(docsrs, doc(cfg(feature = "serde")))]

crates/router/src/bin/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ async fn main() -> ApplicationResult<()> {
4545
let _ = server.await;
4646

4747
Err(error_stack::Report::from(ApplicationError::from(
48-
std::io::Error::new(std::io::ErrorKind::Other, "Server shut down"),
48+
std::io::Error::other("Server shut down"),
4949
)))
5050
}

crates/router/src/core/payments/helpers.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,9 +2008,11 @@ pub fn decide_payment_method_retrieval_action(
20082008
)
20092009
};
20102010

2011-
should_retry_with_pan
2012-
.then_some(VaultFetchAction::FetchCardDetailsFromLocker)
2013-
.unwrap_or_else(standard_flow)
2011+
if should_retry_with_pan {
2012+
VaultFetchAction::FetchCardDetailsFromLocker
2013+
} else {
2014+
standard_flow()
2015+
}
20142016
}
20152017

20162018
pub fn determine_standard_vault_action(

0 commit comments

Comments
 (0)