Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
chore: address Rust 1.83.0 clippy lints and enable more clippy lints (#6705)
Sanchith Hegde9a59d0a5ff68
diff --git a/.clippy.toml b/.clippy.tomlnew file mode 100644index 0000000000..4296655a04--- /dev/null+++ b/.clippy.toml@@ -0,0 +1 @@+allow-dbg-in-tests = truediff --git a/Cargo.toml b/Cargo.tomlindex 90eb996b82..38d895d767 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -18,12 +18,16 @@ unused_qualifications = "warn"[workspace.lints.clippy]as_conversions = "warn"+cloned_instead_of_copied = "warn"+dbg_macro = "warn"expect_used = "warn"+fn_params_excessive_bools = "warn"index_refutable_slice = "warn"indexing_slicing = "warn"large_futures = "warn"match_on_vec_items = "warn"missing_panics_doc = "warn"+mod_module_files = "warn"out_of_bounds_indexing = "warn"panic = "warn"panic_in_result_fn = "warn"@@ -32,10 +36,12 @@ print_stderr = "warn"print_stdout = "warn"todo = "warn"unimplemented = "warn"+unnecessary_self_imports = "warn"unreachable = "warn"unwrap_in_result = "warn"unwrap_used = "warn"use_self = "warn"+wildcard_dependencies = "warn"# Lints to allowoption_map_unit_fn = "allow"diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.jsonindex e3f54813a4..d8ab5a7a20 100644--- a/api-reference-v2/openapi_spec.json+++ b/api-reference-v2/openapi_spec.json@@ -4176,7 +4176,7 @@},"bank_account_bic": {"type": "string",- "description": "Bank account details for Giropay\nBank account bic code",+ "description": "Bank account bic code","nullable": true},"bank_account_iban": {diff --git a/api-reference/openapi_spec.json b/api-reference/openapi_spec.jsonindex 25ed2648cd..f903879c48 100644--- a/api-reference/openapi_spec.json+++ b/api-reference/openapi_spec.json@@ -867,7 +867,6 @@"Payments"],"summary": "Payments - Complete Authorize",- "description": "\n","operationId": "Complete Authorize a Payment","parameters": [{@@ -918,7 +917,6 @@"Payments"],"summary": "Payments - Post Session Tokens",- "description": "\n","operationId": "Create Post Session Tokens for a Payment","requestBody": {"content": {@@ -6757,7 +6755,7 @@},"bank_account_bic": {"type": "string",- "description": "Bank account details for Giropay\nBank account bic code",+ "description": "Bank account bic code","nullable": true},"bank_account_iban": {diff --git a/crates/analytics/src/disputes/metrics/sessionized_metrics/mod.rs b/crates/analytics/src/disputes/metrics/sessionized_metrics.rssimilarity index 100%rename from crates/analytics/src/disputes/metrics/sessionized_metrics/mod.rsrename to crates/analytics/src/disputes/metrics/sessionized_metrics.rsdiff --git a/crates/analytics/src/payment_intents/metrics/sessionized_metrics/mod.rs b/crates/analytics/src/payment_intents/metrics/sessionized_metrics.rssimilarity index 100%rename from crates/analytics/src/payment_intents/metrics/sessionized_metrics/mod.rsrename to crates/analytics/src/payment_intents/metrics/sessionized_metrics.rsdiff --git a/crates/analytics/src/payments/metrics/sessionized_metrics/mod.rs b/crates/analytics/src/payments/metrics/sessionized_metrics.rssimilarity index 100%rename from crates/analytics/src/payments/metrics/sessionized_metrics/mod.rsrename to crates/analytics/src/payments/metrics/sessionized_metrics.rsdiff --git a/crates/analytics/src/refunds/metrics/sessionized_metrics/mod.rs b/crates/analytics/src/refunds/metrics/sessionized_metrics.rssimilarity index 100%rename from crates/analytics/src/refunds/metrics/sessionized_metrics/mod.rsrename to crates/analytics/src/refunds/metrics/sessionized_metrics.rsdiff --git a/crates/api_models/src/admin.rs b/crates/api_models/src/admin.rsindex 7e1465c9d9..f0a8c99943 100644--- a/crates/api_models/src/admin.rs+++ b/crates/api_models/src/admin.rs@@ -1531,7 +1531,6 @@ pub struct MerchantConnectorUpdate {#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]#[serde(deny_unknown_fields)]-pub struct ConnectorWalletDetails {/// This field contains the Apple Pay certificates and credentials for iOS and Web Apple Pay flow#[serde(skip_serializing_if = "Option::is_none")]diff --git a/crates/api_models/src/analytics.rs b/crates/api_models/src/analytics.rsindex d25f35589b..b6d4044c5f 100644--- a/crates/api_models/src/analytics.rs+++ b/crates/api_models/src/analytics.rs@@ -277,7 +277,6 @@ pub struct PaymentIntentFilterValue {#[derive(Debug, serde::Deserialize, serde::Serialize)]#[serde(rename_all = "camelCase")]-pub struct GetRefundFilterRequest {pub time_range: TimeRange,#[serde(default)]@@ -292,7 +291,6 @@ pub struct RefundFiltersResponse {#[derive(Debug, serde::Serialize, Eq, PartialEq)]#[serde(rename_all = "camelCase")]-pub struct RefundFilterValue {pub dimension: RefundDimensions,pub values: Vec<String>,@@ -435,7 +433,6 @@ pub struct DisputeFiltersResponse {#[derive(Debug, serde::Serialize, Eq, PartialEq)]#[serde(rename_all = "camelCase")]-pub struct DisputeFilterValue {pub dimension: DisputeDimensions,pub values: Vec<String>,diff --git a/crates/api_models/src/api_keys.rs b/crates/api_models/src/api_keys.rsindex d25cd989b0..3c4d566f23 100644--- a/crates/api_models/src/api_keys.rs+++ b/crates/api_models/src/api_keys.rs@@ -212,7 +212,7 @@ mod never {{struct NeverVisitor;- impl<'de> serde::de::Visitor<'de> for NeverVisitor {+ impl serde::de::Visitor<'_> for NeverVisitor {type Value = ();fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {diff --git a/crates/api_models/src/conditional_configs.rs b/crates/api_models/src/conditional_configs.rsindex 555e7bd955..3aed34e47a 100644--- a/crates/api_models/src/conditional_configs.rs+++ b/crates/api_models/src/conditional_configs.rs@@ -92,7 +92,6 @@ pub struct ConditionalConfigReq {pub algorithm: Option<Program<ConditionalConfigs>>,}#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]-pub struct DecisionManagerRequest {pub name: Option<String>,pub program: Option<Program<ConditionalConfigs>>,diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rsindex 646ad122d7..c00afac646 100644--- a/crates/api_models/src/enums.rs+++ b/crates/api_models/src/enums.rs@@ -141,7 +141,6 @@ pub enum FrmConnectors {)]#[serde(rename_all = "snake_case")]#[strum(serialize_all = "snake_case")]-pub enum TaxConnectors {Taxjar,}diff --git a/crates/api_models/src/errors/mod.rs b/crates/api_models/src/errors.rssimilarity index 100%rename from crates/api_models/src/errors/mod.rsrename to crates/api_models/src/errors.rsdiff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rsindex fb60937e9b..f46fd450bd 100644--- a/crates/api_models/src/payments.rs+++ b/crates/api_models/src/payments.rs@@ -2457,7 +2457,6 @@ pub enum AdditionalPaymentData {}#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]-pub struct KlarnaSdkPaymentMethod {pub payment_type: Option<String>,}@@ -2504,7 +2503,6 @@ pub enum BankRedirectData {Giropay {/// The billing details for bank redirectionbilling_details: Option<BankRedirectBilling>,- /// Bank account details for Giropay#[schema(value_type = Option<String>)]/// Bank account bic code@@ -3682,7 +3680,6 @@ pub enum WalletResponseData {}#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]-pub struct KlarnaSdkPaymentMethodResponse {pub payment_type: Option<String>,}@@ -4196,7 +4193,6 @@ pub struct ReceiverDetails {#[derive(Clone, Debug, PartialEq, serde::Serialize, ToSchema, router_derive::PolymorphicSchema)]#[generate_schemas(PaymentsCreateResponseOpenApi)]-pub struct PaymentsResponse {/// Unique identifier for the payment. This ensures idempotency for multiple payments/// that have been done by a single merchant.@@ -6355,7 +6351,7 @@ mod payment_id_type {struct PaymentIdVisitor;struct OptionalPaymentIdVisitor;- impl<'de> Visitor<'de> for PaymentIdVisitor {+ impl Visitor<'_> for PaymentIdVisitor {type Value = PaymentIdType;fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {@@ -6433,7 +6429,7 @@ mod payment_id_type {struct PaymentIdVisitor;struct OptionalPaymentIdVisitor;- impl<'de> Visitor<'de> for PaymentIdVisitor {+ impl Visitor<'_> for PaymentIdVisitor {type Value = PaymentIdType;fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {@@ -6507,7 +6503,7 @@ pub mod amount {// This is defined to provide guarded deserialization of amount// which itself handles zero and non-zero values internally- impl<'de> de::Visitor<'de> for AmountVisitor {+ impl de::Visitor<'_> for AmountVisitor {type Value = Amount;fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {@@ -6707,7 +6703,6 @@ pub struct PaymentLinkStatusDetails {#[derive(Clone, Debug, serde::Deserialize, ToSchema, serde::Serialize)]#[serde(deny_unknown_fields)]-pub struct PaymentLinkListConstraints {/// limit on the number of objects to returnpub limit: Option<i64>,diff --git a/crates/api_models/src/pm_auth.rs b/crates/api_models/src/pm_auth.rsindex 8ed52907da..e97efcf92d 100644--- a/crates/api_models/src/pm_auth.rs+++ b/crates/api_models/src/pm_auth.rs@@ -22,7 +22,6 @@ pub struct LinkTokenCreateResponse {#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]#[serde(rename_all = "snake_case")]-pub struct ExchangeTokenCreateRequest {pub public_token: String,pub client_secret: Option<String>,diff --git a/crates/api_models/src/routing.rs b/crates/api_models/src/routing.rsindex 389af3dab7..dbfa770cbf 100644--- a/crates/api_models/src/routing.rs+++ b/crates/api_models/src/routing.rs@@ -473,7 +473,6 @@ impl RoutingAlgorithmRef {}#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]-pub struct RoutingDictionaryRecord {#[schema(value_type = String)]pub id: common_utils::id_type::RoutingId,diff --git a/crates/api_models/src/user/sample_data.rs b/crates/api_models/src/user/sample_data.rsindex dc95de913f..bfcbcb046c 100644--- a/crates/api_models/src/user/sample_data.rs+++ b/crates/api_models/src/user/sample_data.rs@@ -1,5 +1,4 @@use common_enums::{AuthenticationType, CountryAlpha2};-use common_utils::{self};use time::PrimitiveDateTime;use crate::enums::Connector;diff --git a/crates/cards/src/validate.rs b/crates/cards/src/validate.rsindex d3515ef02f..d3a27da482 100644--- a/crates/cards/src/validate.rs+++ b/crates/cards/src/validate.rs@@ -10,14 +10,10 @@ use router_env::{logger, which as router_env_which, Env};use serde::{Deserialize, Deserializer, Serialize};use thiserror::Error;-////// Minimum limit of a card number will not be less than 8 by ISO standards-///pub const MIN_CARD_NUMBER_LENGTH: usize = 8;-////// Maximum limit of a card number will not exceed 19 by ISO standards-///pub const MAX_CARD_NUMBER_LENGTH: usize = 19;#[derive(Debug, Deserialize, Serialize, Error)]@@ -138,11 +134,9 @@ pub fn sanitize_card_number(card_number: &str) -> Result<bool, CardNumberValidatOk(is_card_number_valid)}-////// # Panics////// Never, as a single character will never be greater than 10, or `u8`-///pub fn validate_card_number_chars(number: &str) -> Result<Vec<u8>, CardNumberValidationErr> {let data = number.chars().try_fold(Vec::with_capacity(MAX_CARD_NUMBER_LENGTH),diff --git a/crates/common_enums/src/transformers.rs b/crates/common_enums/src/transformers.rsindex f5f7ba3dec..ddf55d2937 100644--- a/crates/common_enums/src/transformers.rs+++ b/crates/common_enums/src/transformers.rs@@ -1914,7 +1914,7 @@ mod custom_serde {struct FieldVisitor;- impl<'de> Visitor<'de> for FieldVisitor {+ impl Visitor<'_> for FieldVisitor {type Value = CountryAlpha2;fn expecting(&self, formatter: &mut Formatter<'_>) -> fmt::Result {@@ -1946,7 +1946,7 @@ mod custom_serde {struct FieldVisitor;- impl<'de> Visitor<'de> for FieldVisitor {+ impl Visitor<'_> for FieldVisitor {type Value = CountryAlpha3;fn expecting(&self, formatter: &mut Formatter<'_>) -> fmt::Result {@@ -1978,7 +1978,7 @@ mod custom_serde {struct FieldVisitor;- impl<'de> Visitor<'de> for FieldVisitor {+ impl Visitor<'_> for FieldVisitor {type Value = u32;fn expecting(&self, formatter: &mut Formatter<'_>) -> fmt::Result {diff --git a/crates/common_utils/src/crypto.rs b/crates/common_utils/src/crypto.rsindex c7f1c286c5..e8c2b2d5a0 100644--- a/crates/common_utils/src/crypto.rs+++ b/crates/common_utils/src/crypto.rs@@ -238,7 +238,6 @@ impl VerifySignature for HmacSha512 {}}-////// Blake3#[derive(Debug)]pub struct Blake3(String);@@ -437,9 +436,7 @@ pub fn generate_cryptographically_secure_random_bytes<const N: usize>() -> [u8;bytes}-////// A wrapper type to store the encrypted data for sensitive pii domain data types-///#[derive(Debug, Clone)]pub struct Encryptable<T: Clone> {inner: T,@@ -447,9 +444,7 @@ pub struct Encryptable<T: Clone> {}impl<T: Clone, S: masking::Strategy<T>> Encryptable<Secret<T, S>> {- ////// constructor function to be used by the encryptor and decryptor to generate the data type- ///pub fn new(masked_data: Secret<T, S>,encrypted_data: Secret<Vec<u8>, EncryptionStrategy>,@@ -462,33 +457,25 @@ impl<T: Clone, S: masking::Strategy<T>> Encryptable<Secret<T, S>> {}impl<T: Clone> Encryptable<T> {- ////// Get the inner data while consuming self- ///#[inline]pub fn into_inner(self) -> T {self.inner}- ////// Get the reference to inner value- ///#[inline]pub fn get_inner(&self) -> &T {&self.inner}- ////// Get the inner encrypted data while consuming self- ///#[inline]pub fn into_encrypted(self) -> Secret<Vec<u8>, EncryptionStrategy> {self.encrypted}- ////// Deserialize inner value and return new Encryptable object- ///pub fn deserialize_inner_value<U, F>(self,f: F,diff --git a/crates/common_utils/src/custom_serde.rs b/crates/common_utils/src/custom_serde.rsindex 79e0c5b85e..63ef30011f 100644--- a/crates/common_utils/src/custom_serde.rs+++ b/crates/common_utils/src/custom_serde.rs@@ -202,7 +202,6 @@ pub mod timestamp {}/// <https://github.com/serde-rs/serde/issues/994#issuecomment-316895860>-pub mod json_string {use serde::de::{self, Deserialize, DeserializeOwned, Deserializer};use serde_json;diff --git a/crates/common_utils/src/errors.rs b/crates/common_utils/src/errors.rsindex 38b89cbfaf..e62606b458 100644--- a/crates/common_utils/src/errors.rs+++ b/crates/common_utils/src/errors.rs@@ -7,7 +7,6 @@ use crate::types::MinorUnit;/// error_stack::Report<E> specific extendability////// Effectively, equivalent to `Result<T, error_stack::Report<E>>`-///pub type CustomResult<T, E> = error_stack::Result<T, E>;/// Parsing Errorsdiff --git a/crates/common_utils/src/ext_traits.rs b/crates/common_utils/src/ext_traits.rsindex 5ad53ec853..945056aafe 100644--- a/crates/common_utils/src/ext_traits.rs+++ b/crates/common_utils/src/ext_traits.rs@@ -1,7 +1,5 @@-//!//! This module holds traits for extending functionalities for existing datatypes//! & inbuilt datatypes.-//!use error_stack::ResultExt;use masking::{ExposeInterface, PeekInterface, Secret, Strategy};@@ -14,10 +12,8 @@ use crate::{fp_utils::when,};-////// Encode interface/// An interface for performing type conversions and serialization-///pub trait Encode<'e>whereSelf: 'e + std::fmt::Debug,@@ -27,62 +23,49 @@ where/// Converting `Self` into an intermediate representation `<P>`/// and then performing encoding operation using the `Serialize` trait from `serde`/// Specifically to convert into json, by using `serde_json`- ///fn convert_and_encode<P>(&'e self) -> CustomResult<String, errors::ParsingError>whereP: TryFrom<&'e Self> + Serialize,Result<P, <P as TryFrom<&'e Self>>::Error>: ResultExt,<Result<P, <P as TryFrom<&'e Self>>::Error> as ResultExt>::Ok: Serialize;- ////// Converting `Self` into an intermediate representation `<P>`/// and then performing encoding operation using the `Serialize` trait from `serde`/// Specifically, to convert into urlencoded, by using `serde_urlencoded`- ///fn convert_and_url_encode<P>(&'e self) -> CustomResult<String, errors::ParsingError>whereP: TryFrom<&'e Self> + Serialize,Result<P, <P as TryFrom<&'e Self>>::Error>: ResultExt,<Result<P, <P as TryFrom<&'e Self>>::Error> as ResultExt>::Ok: Serialize;- ////// Functionality, for specifically encoding `Self` into `String`/// after serialization by using `serde::Serialize`- ///fn url_encode(&'e self) -> CustomResult<String, errors::ParsingError>whereSelf: Serialize;- ////// Functionality, for specifically encoding `Self` into `String`/// after serialization by using `serde::Serialize`/// specifically, to convert into JSON `String`.- ///fn encode_to_string_of_json(&'e self) -> CustomResult<String, errors::ParsingError>whereSelf: Serialize;- ////// Functionality, for specifically encoding `Self` into `String`/// after serialization by using `serde::Serialize`/// specifically, to convert into XML `String`.- ///fn encode_to_string_of_xml(&'e self) -> CustomResult<String, errors::ParsingError>whereSelf: Serialize;- ////// Functionality, for specifically encoding `Self` into `serde_json::Value`/// after serialization by using `serde::Serialize`- ///fn encode_to_value(&'e self) -> CustomResult<serde_json::Value, errors::ParsingError>whereSelf: Serialize;- ////// Functionality, for specifically encoding `Self` into `Vec<u8>`/// after serialization by using `serde::Serialize`- ///fn encode_to_vec(&'e self) -> CustomResult<Vec<u8>, errors::ParsingError>whereSelf: Serialize;@@ -165,13 +148,9 @@ where}}-////// Extending functionalities of `bytes::Bytes`-///pub trait BytesExt {- ////// Convert `bytes::Bytes` into type `<T>` using `serde::Deserialize`- ///fn parse_struct<'de, T>(&'de self,type_name: &'static str,@@ -199,13 +178,9 @@ impl BytesExt for bytes::Bytes {}}-////// Extending functionalities of `[u8]` for performing parsing-///pub trait ByteSliceExt {- ////// Convert `[u8]` into type `<T>` by using `serde::Deserialize`- ///fn parse_struct<'de, T>(&'de self,type_name: &'static str,@@ -229,13 +204,9 @@ impl ByteSliceExt for [u8] {}}-////// Extending functionalities of `serde_json::Value` for performing parsing-///pub trait ValueExt {- ////// Convert `serde_json::Value` into type `<T>` by using `serde::Deserialize`- ///fn parse_value<T>(self, type_name: &'static str) -> CustomResult<T, errors::ParsingError>whereT: serde::de::DeserializeOwned;@@ -277,22 +248,16 @@ impl<E: ValueExt + Clone> ValueExt for crypto::Encryptable<E> {}}-////// Extending functionalities of `String` for performing parsing-///pub trait StringExt<T> {- ////// Convert `String` into type `<T>` (which being an `enum`)- ///fn parse_enum(self, enum_name: &'static str) -> CustomResult<T, errors::ParsingError>whereT: std::str::FromStr,// Requirement for converting the `Err` variant of `FromStr` to `Report<Err>`<T as std::str::FromStr>::Err: std::error::Error + Send + Sync + 'static;- ////// Convert `serde_json::Value` into type `<T>` by using `serde::Deserialize`- ///fn parse_struct<'de>(&'de self,type_name: &'static str,@@ -327,25 +292,20 @@ impl<T> StringExt<T> for String {}}-////// Extending functionalities of Wrapper types for idiomatic-///#[cfg(feature = "async_ext")]#[cfg_attr(feature = "async_ext", async_trait::async_trait)]pub trait AsyncExt<A, B> {/// Output type of the map functiontype WrappedSelf<T>;- ///+/// Extending map by allowing functions which are async- ///async fn async_map<F, Fut>(self, func: F) -> Self::WrappedSelf<B>whereF: FnOnce(A) -> Fut + Send,Fut: futures::Future<Output = B> + Send;- ////// Extending the `and_then` by allowing functions which are async- ///async fn async_and_then<F, Fut>(self, func: F) -> Self::WrappedSelf<B>whereF: FnOnce(A) -> Fut + Send,@@ -469,9 +429,7 @@ where/// Extension trait for deserializing XML strings using `quick-xml` cratepub trait XmlExt {- ////// Deserialize an XML string into the specified type `<T>`.- ///fn parse_xml<T>(self) -> Result<T, de::DeError>whereT: serde::de::DeserializeOwned;diff --git a/crates/common_utils/src/pii.rs b/crates/common_utils/src/pii.rsindex 9d4b96200b..5fd0e8078a 100644--- a/crates/common_utils/src/pii.rs+++ b/crates/common_utils/src/pii.rs@@ -348,7 +348,6 @@ where}/// Strategy for masking UPI VPA's-#[derive(Debug)]pub enum UpiVpaMaskingStrategy {}diff --git a/crates/common_utils/src/signals.rs b/crates/common_utils/src/signals.rsindex 5bde366bf3..d008aef290 100644--- a/crates/common_utils/src/signals.rs+++ b/crates/common_utils/src/signals.rs@@ -6,10 +6,8 @@ use futures::StreamExt;use router_env::logger;use tokio::sync::mpsc;-////// This functions is meant to run in parallel to the application./// It will send a signal to the receiver when a SIGTERM or SIGINT is received-///#[cfg(not(target_os = "windows"))]pub async fn signal_handler(mut sig: signal_hook_tokio::Signals, sender: mpsc::Sender<()>) {if let Some(signal) = sig.next().await {@@ -34,47 +32,35 @@ pub async fn signal_handler(mut sig: signal_hook_tokio::Signals, sender: mpsc::S}}-////// This functions is meant to run in parallel to the application./// It will send a signal to the receiver when a SIGTERM or SIGINT is received-///#[cfg(target_os = "windows")]pub async fn signal_handler(_sig: DummySignal, _sender: mpsc::Sender<()>) {}-////// This function is used to generate a list of signals that the signal_handler should listen for-///#[cfg(not(target_os = "windows"))]pub fn get_allowed_signals() -> Result<signal_hook_tokio::SignalsInfo, std::io::Error> {signal_hook_tokio::Signals::new([signal_hook::consts::SIGTERM, signal_hook::consts::SIGINT])}-////// This function is used to generate a list of signals that the signal_handler should listen for-///#[cfg(target_os = "windows")]pub fn get_allowed_signals() -> Result<DummySignal, std::io::Error> {Ok(DummySignal)}-////// Dummy Signal Handler for windows-///#[cfg(target_os = "windows")]#[derive(Debug, Clone)]pub struct DummySignal;#[cfg(target_os = "windows")]impl DummySignal {- ////// Dummy handler for signals in windows (empty)- ///pub fn handle(&self) -> Self {self.clone()}- ////// Hollow implementation, for windows compatibility- ///pub fn close(self) {}}diff --git a/crates/common_utils/src/types.rs b/crates/common_utils/src/types.rsindex 2a271acb62..1e547a4971 100644--- a/crates/common_utils/src/types.rs+++ b/crates/common_utils/src/types.rs@@ -334,7 +334,6 @@ impl AmountConvertor for FloatMajorUnitForConnector {}/// Connector required amount type-#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, Copy, PartialEq)]pub struct MinorUnitForConnector;@@ -503,7 +502,6 @@ impl Sum for MinorUnit {}/// Connector specific types to send-#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, PartialEq)]pub struct StringMinorUnit(String);@@ -749,7 +747,7 @@ mod client_secret_type {{struct ClientSecretVisitor;- impl<'de> Visitor<'de> for ClientSecretVisitor {+ impl Visitor<'_> for ClientSecretVisitor {type Value = ClientSecret;fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {diff --git a/crates/common_utils/src/types/keymanager.rs b/crates/common_utils/src/types/keymanager.rsindex 078f1f3fcd..09d26bd91e 100644--- a/crates/common_utils/src/types/keymanager.rs+++ b/crates/common_utils/src/types/keymanager.rs@@ -393,7 +393,7 @@ impl<'de> Deserialize<'de> for DecryptedData {{struct DecryptedDataVisitor;- impl<'de> Visitor<'de> for DecryptedDataVisitor {+ impl Visitor<'_> for DecryptedDataVisitor {type Value = DecryptedData;fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {@@ -449,7 +449,7 @@ impl<'de> Deserialize<'de> for EncryptedData {{struct EncryptedDataVisitor;- impl<'de> Visitor<'de> for EncryptedDataVisitor {+ impl Visitor<'_> for EncryptedDataVisitor {type Value = EncryptedData;fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {diff --git a/crates/connector_configs/src/common_config.rs b/crates/connector_configs/src/common_config.rsindex 26c9d33f40..8f6e03fb39 100644--- a/crates/connector_configs/src/common_config.rs+++ b/crates/connector_configs/src/common_config.rs@@ -106,7 +106,6 @@ pub struct ApiModelMetaData {#[serde_with::skip_serializing_none]#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]-pub enum KlarnaEndpoint {Europe,NorthAmerica,diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rsindex 0e68b04d27..524bfa7170 100644--- a/crates/connector_configs/src/connector.rs+++ b/crates/connector_configs/src/connector.rs@@ -73,7 +73,6 @@ pub enum ApplePayTomlConfig {#[serde_with::skip_serializing_none]#[derive(Debug, Clone, serde::Serialize, Deserialize)]-pub enum KlarnaEndpoint {Europe,NorthAmerica,diff --git a/crates/diesel_models/src/configs.rs b/crates/diesel_models/src/configs.rsindex 2b30aa6a97..37381961d9 100644--- a/crates/diesel_models/src/configs.rs+++ b/crates/diesel_models/src/configs.rs@@ -7,7 +7,6 @@ use crate::schema::configs;#[derive(Default, Clone, Debug, Insertable, Serialize, Deserialize)]#[diesel(table_name = configs)]-pub struct ConfigNew {pub key: String,pub config: String,diff --git a/crates/diesel_models/src/lib.rs b/crates/diesel_models/src/lib.rsindex c7a3818d5f..7e476662ea 100644--- a/crates/diesel_models/src/lib.rs+++ b/crates/diesel_models/src/lib.rs@@ -75,7 +75,6 @@ pub use self::{/// `Option<T>` values.////// [diesel-2.0-array-nullability]: https://diesel.rs/guides/migration_guide.html#2-0-0-nullability-of-array-elements-#[doc(hidden)]pub(crate) mod diesel_impl {use diesel::{diff --git a/crates/diesel_models/src/organization.rs b/crates/diesel_models/src/organization.rsindex bd4fd11920..6a3cad24e1 100644--- a/crates/diesel_models/src/organization.rs+++ b/crates/diesel_models/src/organization.rs@@ -197,8 +197,8 @@ impl From<OrganizationUpdate> for OrganizationUpdateInternal {}}}-#[cfg(feature = "v2")]+#[cfg(feature = "v2")]impl From<OrganizationUpdate> for OrganizationUpdateInternal {fn from(value: OrganizationUpdate) -> Self {match value {diff --git a/crates/diesel_models/src/payment_attempt.rs b/crates/diesel_models/src/payment_attempt.rsindex 7760ea76c5..6ddc26d49b 100644--- a/crates/diesel_models/src/payment_attempt.rs+++ b/crates/diesel_models/src/payment_attempt.rs@@ -6,7 +6,7 @@ use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};use serde::{Deserialize, Serialize};use time::PrimitiveDateTime;-use crate::enums::{self as storage_enums};+use crate::enums as storage_enums;#[cfg(feature = "v1")]use crate::schema::payment_attempt;#[cfg(feature = "v2")]diff --git a/crates/diesel_models/src/reverse_lookup.rs b/crates/diesel_models/src/reverse_lookup.rsindex 87fca34407..974851f966 100644--- a/crates/diesel_models/src/reverse_lookup.rs+++ b/crates/diesel_models/src/reverse_lookup.rs@@ -2,7 +2,6 @@ use diesel::{Identifiable, Insertable, Queryable, Selectable};use crate::schema::reverse_lookup;-////// This reverse lookup table basically looks up id's and get result_id that you want. This is/// useful for KV where you can't lookup without key#[derive(diff --git a/crates/diesel_models/src/services/logger.rs b/crates/diesel_models/src/services/logger.rsdeleted file mode 100644index 9c1b20c9d2..0000000000--- a/crates/diesel_models/src/services/logger.rs+++ /dev/null@@ -1,5 +0,0 @@-//!-//! Logger of the system.-//!--pub use crate::env::logger::*;diff --git a/crates/drainer/src/services.rs b/crates/drainer/src/services.rsindex 55ffe0c4e7..87057ebeff 100644--- a/crates/drainer/src/services.rs+++ b/crates/drainer/src/services.rs@@ -29,7 +29,6 @@ impl Store {////// Panics if there is a failure while obtaining the HashiCorp client using the provided configuration./// This panic indicates a critical failure in setting up external services, and the application cannot proceed without a valid HashiCorp client.- ///pub async fn new(config: &crate::Settings, test_transaction: bool, tenant: &Tenant) -> Self {let redis_conn = crate::connection::redis_connection(config).await;Self {diff --git a/crates/euclid/src/dssa/analyzer.rs b/crates/euclid/src/dssa/analyzer.rsindex a81e7be351..7aeb850e1b 100644--- a/crates/euclid/src/dssa/analyzer.rs+++ b/crates/euclid/src/dssa/analyzer.rs@@ -87,7 +87,7 @@ pub fn analyze_exhaustive_negations(.cloned().unwrap_or_default().iter()- .cloned()+ .copied().cloned().collect(),};@@ -121,12 +121,12 @@ fn analyze_negated_assertions(value: (*val).clone(),assertion_metadata: assertion_metadata.get(*val)- .cloned()+ .copied().cloned().unwrap_or_default(),negation_metadata: negation_metadata.get(*val)- .cloned()+ .copied().cloned().unwrap_or_default(),};diff --git a/crates/euclid/src/dssa/graph.rs b/crates/euclid/src/dssa/graph.rsindex 30d71090f3..7ef9bb244d 100644--- a/crates/euclid/src/dssa/graph.rs+++ b/crates/euclid/src/dssa/graph.rs@@ -421,7 +421,7 @@ impl CgraphExt for cgraph::ConstraintGraph<dir::DirValue> {for (key, negation_set) in keywise_negation {let all_metadata = keywise_metadata.remove(&key).unwrap_or_default();- let first_metadata = all_metadata.first().cloned().cloned().unwrap_or_default();+ let first_metadata = all_metadata.first().copied().cloned().unwrap_or_default();self.key_analysis(key.clone(), analysis_ctx, memo, cycle_map, domains).map_err(|e| AnalysisError::assertion_from_graph_error(&first_metadata, e))?;diff --git a/crates/euclid/src/dssa/types.rs b/crates/euclid/src/dssa/types.rsindex df54de2dd9..f8340c3150 100644--- a/crates/euclid/src/dssa/types.rs+++ b/crates/euclid/src/dssa/types.rs@@ -18,7 +18,7 @@ pub enum CtxValueKind<'a> {Negation(&'a [dir::DirValue]),}-impl<'a> CtxValueKind<'a> {+impl CtxValueKind<'_> {pub fn get_assertion(&self) -> Option<&dir::DirValue> {if let Self::Assertion(val) = self {Some(val)diff --git a/crates/euclid/src/frontend/ast.rs b/crates/euclid/src/frontend/ast.rsindex 5a7b88acfb..7c75ad000b 100644--- a/crates/euclid/src/frontend/ast.rs+++ b/crates/euclid/src/frontend/ast.rs@@ -135,7 +135,6 @@ pub struct IfStatement {/// }/// }/// ```-#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]#[serde(rename_all = "camelCase")]#[aliases(RuleConnectorSelection = Rule<ConnectorSelection>)]diff --git a/crates/euclid/src/frontend/ast/lowering.rs b/crates/euclid/src/frontend/ast/lowering.rsindex 24fc1e8042..ec629358d5 100644--- a/crates/euclid/src/frontend/ast/lowering.rs+++ b/crates/euclid/src/frontend/ast/lowering.rs@@ -25,7 +25,6 @@ use crate::{/// This serves for the purpose were we have the DirKey as an explicit Enum type and value as one/// of the member of the same Enum./// So particularly it lowers a predefined Enum from DirKey to an Enum of DirValue.-macro_rules! lower_enum {($key:ident, $value:ident) => {match $value {@@ -70,7 +69,6 @@ macro_rules! lower_enum {/// This is for the cases in which there are numerical values involved and they are lowered/// accordingly on basis of the supplied key, currently payment_amount is the only key having this/// use case-macro_rules! lower_number {($key:ident, $value:ident, $comp:ident) => {match $value {@@ -117,7 +115,6 @@ macro_rules! lower_number {////// This serves for the purpose were we have the DirKey as Card_bin and value as an arbitrary string/// So particularly it lowers an arbitrary value to a predefined key.-macro_rules! lower_str {($key:ident, $value:ident $(, $validation_closure:expr)?) => {match $value {@@ -155,7 +152,6 @@ macro_rules! lower_metadata {/// by throwing required errors for comparisons that can't be performed for a certain value type/// for example/// can't have greater/less than operations on enum types-fn lower_comparison_inner<O: EuclidDirFilter>(comp: ast::Comparison,) -> Result<Vec<dir::DirValue>, AnalysisErrorType> {diff --git a/crates/euclid/src/frontend/ast/parser.rs b/crates/euclid/src/frontend/ast/parser.rsindex 0c586e178e..63a0ea08b8 100644--- a/crates/euclid/src/frontend/ast/parser.rs+++ b/crates/euclid/src/frontend/ast/parser.rs@@ -51,9 +51,9 @@ impl EuclidParsable for DummyOutput {)(input)}}-pub fn skip_ws<'a, F, O>(inner: F) -> impl FnMut(&'a str) -> ParseResult<&str, O>+pub fn skip_ws<'a, F, O>(inner: F) -> impl FnMut(&'a str) -> ParseResult<&'a str, O>where- F: FnMut(&'a str) -> ParseResult<&str, O> + 'a,+ F: FnMut(&'a str) -> ParseResult<&'a str, O> + 'a,{sequence::preceded(pchar::multispace0, inner)}diff --git a/crates/events/src/lib.rs b/crates/events/src/lib.rsindex 3d333ec54b..38a597e030 100644--- a/crates/events/src/lib.rs+++ b/crates/events/src/lib.rs@@ -2,14 +2,12 @@#![cfg_attr(docsrs, doc(cfg_hide(doc)))]#![warn(missing_docs)]-//!//! A generic event handler system.//! This library consists of 4 parts://! Event Sink: A trait that defines how events are published. This could be a simple logger, a message queue, or a database.//! EventContext: A struct that holds the event sink and metadata about the event. This is used to create events. This can be used to add metadata to all events, such as the user who triggered the event.//! EventInfo: A trait that defines the metadata that is sent with the event. It works with the EventContext to add metadata to all events.//! Event: A trait that defines the event itself. This trait is used to define the data that is sent with the event and defines the event's type & identifier.-//!mod actix;diff --git a/crates/external_services/src/file_storage.rs b/crates/external_services/src/file_storage.rsindex e551cfee2a..479b7c5f38 100644--- a/crates/external_services/src/file_storage.rs+++ b/crates/external_services/src/file_storage.rs@@ -1,6 +1,4 @@-//!//! Module for managing file storage operations with support for multiple storage schemes.-//!use std::{fmt::{Display, Formatter},diff --git a/crates/external_services/src/file_storage/file_system.rs b/crates/external_services/src/file_storage/file_system.rsindex e3986abf0f..19b3185e81 100644--- a/crates/external_services/src/file_storage/file_system.rs+++ b/crates/external_services/src/file_storage/file_system.rs@@ -1,6 +1,4 @@-//!//! Module for local file system storage operations-//!use std::{fs::{remove_file, File},diff --git a/crates/external_services/src/hashicorp_vault/core.rs b/crates/external_services/src/hashicorp_vault/core.rsindex 15edcb6418..3cc03b4330 100644--- a/crates/external_services/src/hashicorp_vault/core.rs+++ b/crates/external_services/src/hashicorp_vault/core.rs@@ -103,7 +103,6 @@ impl HashiCorpVault {/// # Parameters////// - `config`: A reference to a `HashiCorpVaultConfig` containing the configuration details.- ///pub fn new(config: &HashiCorpVaultConfig) -> error_stack::Result<Self, HashiCorpError> {VaultClient::new(VaultClientSettingsBuilder::default()@@ -129,7 +128,6 @@ impl HashiCorpVault {////// - `En`: The engine type that implements the `Engine` trait./// - `I`: The type that can be constructed from the retrieved encoded data.- ///pub async fn fetch<En, I>(&self, data: String) -> error_stack::Result<I, HashiCorpError>wherefor<'a> En: Engine<diff --git a/crates/external_services/src/managers/encryption_management.rs b/crates/external_services/src/managers/encryption_management.rsindex 678239c60b..a0add63823 100644--- a/crates/external_services/src/managers/encryption_management.rs+++ b/crates/external_services/src/managers/encryption_management.rs@@ -1,6 +1,4 @@-//!//! Encryption management util module-//!use std::sync::Arc;diff --git a/crates/external_services/src/managers/secrets_management.rs b/crates/external_services/src/managers/secrets_management.rsindex b79046b4c7..7b27e74bf3 100644--- a/crates/external_services/src/managers/secrets_management.rs+++ b/crates/external_services/src/managers/secrets_management.rs@@ -1,6 +1,4 @@-//!//! Secrets management util module-//!use common_utils::errors::CustomResult;#[cfg(feature = "hashicorp-vault")]diff --git a/crates/external_services/src/no_encryption.rs b/crates/external_services/src/no_encryption.rsindex 17c29618f8..6f805fc7a1 100644--- a/crates/external_services/src/no_encryption.rs+++ b/crates/external_services/src/no_encryption.rs@@ -1,6 +1,4 @@-//!//! No encryption functionalities-//!pub mod core;diff --git a/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs b/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rsindex 180db62686..479abf13b1 100644--- a/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs@@ -916,7 +916,6 @@ pub struct Data {}#[derive(Default, Debug, Clone, Serialize, Deserialize, Eq, PartialEq)]-pub struct MultisafepayPaymentDetails {pub account_holder_name: Option<Secret<String>>,pub account_id: Option<Secret<String>>,diff --git a/crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs b/crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rsindex 6297b97ee9..8d6dc42926 100644--- a/crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs@@ -122,7 +122,6 @@ pub struct NexinetsBankRedirects {#[derive(Debug, Serialize)]#[serde(rename_all = "camelCase")]-pub struct NexinetsAsyncDetails {pub success_url: Option<String>,pub cancel_url: Option<String>,diff --git a/crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs b/crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rsindex b2bf76944c..18783c64a0 100644--- a/crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs@@ -80,7 +80,6 @@ pub struct NovalnetPaymentsRequestCustomer {no_nc: i64,}#[derive(Default, Debug, Clone, Serialize, Deserialize)]-pub struct NovalnetCard {card_number: CardNumber,card_expiry_month: Secret<String>,diff --git a/crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs b/crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rsindex 3b2164dfc9..c799cf2594 100644--- a/crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs@@ -58,7 +58,6 @@ pub struct RazorpayPaymentsRequest {#[derive(Default, Debug, Serialize, Eq, PartialEq)]#[serde(rename_all = "camelCase")]-pub struct SecondFactor {txn_id: String,id: String,@@ -981,7 +980,6 @@ pub struct RazorpaySyncResponse {#[derive(Debug, Clone, Serialize, Deserialize)]#[serde(rename_all = "SCREAMING_SNAKE_CASE")]-pub enum PsyncStatus {Charged,Pending,@@ -1054,7 +1052,6 @@ pub struct Refund {#[derive(Default, Debug, Serialize, Deserialize)]#[serde(rename_all = "SCREAMING_SNAKE_CASE")]-pub enum RefundStatus {Success,Failure,@@ -1221,7 +1218,6 @@ impl From<RefundStatus> for enums::RefundStatus {#[derive(Default, Debug, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]-pub struct RefundResponse {txn_id: Option<String>,refund: RefundRes,diff --git a/crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs b/crates/hyperswitch_connectors/src/connectors/tsys/transformers.rsindex cd9fe63e4a..27b9daaa57 100644--- a/crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs@@ -457,7 +457,6 @@ pub struct TsysCaptureRequest {#[derive(Debug, Serialize)]#[serde(rename_all = "PascalCase")]-pub struct TsysPaymentsCaptureRequest {capture: TsysCaptureRequest,}diff --git a/crates/hyperswitch_connectors/src/connectors/worldpay.rs b/crates/hyperswitch_connectors/src/connectors/worldpay.rsindex be8f9bca35..266fcc7d65 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpay.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpay.rs@@ -54,8 +54,8 @@ use response::{WP_CORRELATION_ID,};use ring::hmac;-use transformers::{self as worldpay};+use self::transformers as worldpay;use crate::{constants::headers,types::ResponseRouterData,diff --git a/crates/hyperswitch_connectors/src/utils.rs b/crates/hyperswitch_connectors/src/utils.rsindex a7fe1cc4cd..181f46a205 100644--- a/crates/hyperswitch_connectors/src/utils.rs+++ b/crates/hyperswitch_connectors/src/utils.rs@@ -119,7 +119,7 @@ wherepub(crate) fn missing_field_err(message: &'static str,-) -> Box<dyn Fn() -> error_stack::Report<errors::ConnectorError> + '_> {+) -> Box<dyn Fn() -> error_stack::Report<errors::ConnectorError> + 'static> {Box::new(move || {errors::ConnectorError::MissingRequiredField {field_name: message,diff --git a/crates/hyperswitch_constraint_graph/src/graph.rs b/crates/hyperswitch_constraint_graph/src/graph.rsindex 7c435fee29..8d56406d2a 100644--- a/crates/hyperswitch_constraint_graph/src/graph.rs+++ b/crates/hyperswitch_constraint_graph/src/graph.rs@@ -120,7 +120,7 @@ wherealready_memo.clone().map_err(|err| GraphError::AnalysisError(Arc::downgrade(&err)))- } else if let Some((initial_strength, initial_relation)) = cycle_map.get(&node_id).cloned()+ } else if let Some((initial_strength, initial_relation)) = cycle_map.get(&node_id).copied(){let strength_relation = Strength::get_resolved_strength(initial_strength, strength);let relation_resolve =@@ -197,7 +197,7 @@ whereif !unsatisfied.is_empty() {let err = Arc::new(AnalysisTrace::AllAggregation {unsatisfied,- info: self.node_info.get(vald.node_id).cloned().flatten(),+ info: self.node_info.get(vald.node_id).copied().flatten(),metadata: self.node_metadata.get(vald.node_id).cloned().flatten(),});@@ -264,7 +264,7 @@ where} else {let err = Arc::new(AnalysisTrace::AnyAggregation {unsatisfied: unsatisfied.clone(),- info: self.node_info.get(vald.node_id).cloned().flatten(),+ info: self.node_info.get(vald.node_id).copied().flatten(),metadata: self.node_metadata.get(vald.node_id).cloned().flatten(),});@@ -305,7 +305,7 @@ whereexpected: expected.iter().cloned().collect(),found: None,relation: vald.relation,- info: self.node_info.get(vald.node_id).cloned().flatten(),+ info: self.node_info.get(vald.node_id).copied().flatten(),metadata: self.node_metadata.get(vald.node_id).cloned().flatten(),});@@ -324,7 +324,7 @@ whereexpected: expected.iter().cloned().collect(),found: Some(ctx_value.clone()),relation: vald.relation,- info: self.node_info.get(vald.node_id).cloned().flatten(),+ info: self.node_info.get(vald.node_id).copied().flatten(),metadata: self.node_metadata.get(vald.node_id).cloned().flatten(),});@@ -402,7 +402,7 @@ wherelet err = Arc::new(AnalysisTrace::Value {value: val.clone(),relation: vald.relation,- info: self.node_info.get(vald.node_id).cloned().flatten(),+ info: self.node_info.get(vald.node_id).copied().flatten(),metadata: self.node_metadata.get(vald.node_id).cloned().flatten(),predecessors: Some(error::ValueTracePredecessor::Mandatory(Box::new(trace.get_analysis_trace()?,@@ -437,7 +437,7 @@ wherelet err = Arc::new(AnalysisTrace::Value {value: val.clone(),relation: vald.relation,- info: self.node_info.get(vald.node_id).cloned().flatten(),+ info: self.node_info.get(vald.node_id).copied().flatten(),metadata: self.node_metadata.get(vald.node_id).cloned().flatten(),predecessors: Some(error::ValueTracePredecessor::OneOf(errors.clone())),});@@ -469,7 +469,7 @@ wherevalue: val.clone(),relation,predecessors: None,- info: self.node_info.get(node_id).cloned().flatten(),+ info: self.node_info.get(node_id).copied().flatten(),metadata: self.node_metadata.get(node_id).cloned().flatten(),});memo.insert((node_id, relation, strength), Err(Arc::clone(&err)));diff --git a/crates/hyperswitch_domain_models/src/merchant_account.rs b/crates/hyperswitch_domain_models/src/merchant_account.rsindex 1e3302dab4..a6d2114f0f 100644--- a/crates/hyperswitch_domain_models/src/merchant_account.rs+++ b/crates/hyperswitch_domain_models/src/merchant_account.rs@@ -255,7 +255,6 @@ pub enum MerchantAccountUpdate {}#[cfg(feature = "v1")]-impl From<MerchantAccountUpdate> for MerchantAccountUpdateInternal {fn from(merchant_account_update: MerchantAccountUpdate) -> Self {let now = date_time::now();diff --git a/crates/hyperswitch_domain_models/src/payment_method_data.rs b/crates/hyperswitch_domain_models/src/payment_method_data.rsindex ea994946ca..820959a596 100644--- a/crates/hyperswitch_domain_models/src/payment_method_data.rs+++ b/crates/hyperswitch_domain_models/src/payment_method_data.rs@@ -161,7 +161,6 @@ pub enum PayLaterData {}#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize)]-pub enum WalletData {AliPayQr(Box<AliPayQr>),AliPayRedirect(AliPayRedirection),@@ -234,7 +233,6 @@ pub struct SamsungPayTokenData {}#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize)]-pub struct GooglePayWalletData {/// The type of payment methodpub pm_type: String,@@ -304,7 +302,6 @@ pub struct MobilePayRedirection {}pub struct MbWayRedirection {}#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize)]-pub struct GooglePayPaymentMethodInfo {/// The name of the card networkpub card_network: String,@@ -361,7 +358,6 @@ pub struct ApplepayPaymentMethod {}#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]-pub enum RealTimePaymentData {DuitNow {},Fps {},@@ -370,7 +366,6 @@ pub enum RealTimePaymentData {}#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]-pub enum BankRedirectData {BancontactCard {card_number: Option<cards::CardNumber>,diff --git a/crates/hyperswitch_interfaces/src/secrets_interface.rs b/crates/hyperswitch_interfaces/src/secrets_interface.rsindex 761981bedd..6944729191 100644--- a/crates/hyperswitch_interfaces/src/secrets_interface.rs+++ b/crates/hyperswitch_interfaces/src/secrets_interface.rs@@ -10,11 +10,13 @@ use masking::Secret;/// Trait defining the interface for managing application secrets#[async_trait::async_trait]pub trait SecretManagementInterface: Send + Sync {+ /*/// Given an input, encrypt/store the secret- // async fn store_secret(- // &self,- // input: Secret<String>,- // ) -> CustomResult<String, SecretsManagementError>;+ async fn store_secret(+ &self,+ input: Secret<String>,+ ) -> CustomResult<String, SecretsManagementError>;+ *//// Given an input, decrypt/retrieve the secretasync fn get_secret(diff --git a/crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rs b/crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rsindex d1da6a8c8b..9573dfa12c 100644--- a/crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rs+++ b/crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rs@@ -26,17 +26,13 @@ pub struct SecretStateContainer<T, S: SecretState> {}impl<T: Clone, S: SecretState> SecretStateContainer<T, S> {- ////// Get the inner data while consuming self- ///#[inline]pub fn into_inner(self) -> T {self.inner}- ////// Get the reference to inner value- ///#[inline]pub fn get_inner(&self) -> &T {&self.innerdiff --git a/crates/kgraph_utils/src/types.rs b/crates/kgraph_utils/src/types.rsindex 26f27896e0..9ff55b68ab 100644--- a/crates/kgraph_utils/src/types.rs+++ b/crates/kgraph_utils/src/types.rs@@ -2,8 +2,8 @@ use std::collections::{HashMap, HashSet};use api_models::enums as api_enums;use serde::Deserialize;-#[derive(Debug, Deserialize, Clone, Default)]+#[derive(Debug, Deserialize, Clone, Default)]pub struct CountryCurrencyFilter {pub connector_configs: HashMap<api_enums::RoutableConnectors, PaymentMethodFilters>,pub default_configs: Option<PaymentMethodFilters>,diff --git a/crates/masking/src/abs.rs b/crates/masking/src/abs.rsindex f50725d9f2..6501f89c9d 100644--- a/crates/masking/src/abs.rs+++ b/crates/masking/src/abs.rs@@ -1,6 +1,4 @@-//!//! Abstract data types.-//!use crate::Secret;diff --git a/crates/masking/src/boxed.rs b/crates/masking/src/boxed.rsindex 67397ec3c0..42dda0873a 100644--- a/crates/masking/src/boxed.rs+++ b/crates/masking/src/boxed.rs@@ -1,4 +1,3 @@-//!//! `Box` types containing secrets//!//! There is not alias type by design.diff --git a/crates/masking/src/diesel.rs b/crates/masking/src/diesel.rsindex ea60a861c9..148e50ed82 100644--- a/crates/masking/src/diesel.rs+++ b/crates/masking/src/diesel.rs@@ -1,6 +1,4 @@-//!//! Diesel-related.-//!use diesel::{backend::Backend,@@ -13,7 +11,7 @@ use diesel::{use crate::{Secret, Strategy, StrongSecret, ZeroizableSecret};-impl<'expr, S, I, T> AsExpression<T> for &'expr Secret<S, I>+impl<S, I, T> AsExpression<T> for &Secret<S, I>whereT: sql_types::SingleValue,I: Strategy<S>,@@ -24,7 +22,7 @@ where}}-impl<'expr2, 'expr, S, I, T> AsExpression<T> for &'expr2 &'expr Secret<S, I>+impl<S, I, T> AsExpression<T> for &&Secret<S, I>whereT: sql_types::SingleValue,I: Strategy<S>,@@ -81,7 +79,7 @@ where}}-impl<'expr, S, I, T> AsExpression<T> for &'expr StrongSecret<S, I>+impl<S, I, T> AsExpression<T> for &StrongSecret<S, I>whereT: sql_types::SingleValue,S: ZeroizableSecret,@@ -93,7 +91,7 @@ where}}-impl<'expr2, 'expr, S, I, T> AsExpression<T> for &'expr2 &'expr StrongSecret<S, I>+impl<S, I, T> AsExpression<T> for &&StrongSecret<S, I>whereT: sql_types::SingleValue,S: ZeroizableSecret,diff --git a/crates/masking/src/lib.rs b/crates/masking/src/lib.rsindex d376e935bd..49e9cbf54f 100644--- a/crates/masking/src/lib.rs+++ b/crates/masking/src/lib.rs@@ -2,10 +2,8 @@#![cfg_attr(docsrs, doc(cfg_hide(doc)))]#![warn(missing_docs)]-//!//! Personal Identifiable Information protection. Wrapper types and traits for secret management which help ensure they aren't accidentally copied, logged, or otherwise exposed (as much as possible), and also ensure secrets are securely wiped from memory when dropped.//! Secret-keeping library inspired by secrecy.-//!#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR" ), "/", "README.md"))]@@ -49,7 +47,6 @@ pub use crate::serde::{/// This module should be included with asterisk.////// `use masking::prelude::*;`-///pub mod prelude {pub use super::{ExposeInterface, ExposeOptionInterface, PeekInterface};}diff --git a/crates/masking/src/maskable.rs b/crates/masking/src/maskable.rsindex 7969c9ab8e..e957e89b35 100644--- a/crates/masking/src/maskable.rs+++ b/crates/masking/src/maskable.rs@@ -1,13 +1,9 @@-//!//! This module contains Masking objects and traits-//!use crate::{ExposeInterface, Secret};-////// An Enum that allows us to optionally mask data, based on which enum variant that data is stored/// in.-///#[derive(Clone, Eq, PartialEq)]pub enum Maskable<T: Eq + PartialEq + Clone> {/// Variant which masks the data by wrapping in a Secret@@ -35,9 +31,7 @@ impl<T: Eq + PartialEq + Clone + std::hash::Hash> std::hash::Hash for Maskable<T}impl<T: Eq + PartialEq + Clone> Maskable<T> {- ////// Get the inner data while consuming self- ///pub fn into_inner(self) -> T {match self {Self::Masked(inner_secret) => inner_secret.expose(),@@ -45,49 +39,37 @@ impl<T: Eq + PartialEq + Clone> Maskable<T> {}}- ////// Create a new Masked data- ///pub fn new_masked(item: Secret<T>) -> Self {Self::Masked(item)}- ////// Create a new non-masked data- ///pub fn new_normal(item: T) -> Self {Self::Normal(item)}- ////// Checks whether the data is masked./// Returns `true` if the data is wrapped in the `Masked` variant,/// returns `false` otherwise.- ///pub fn is_masked(&self) -> bool {matches!(self, Self::Masked(_))}- ////// Checks whether the data is normal (not masked)./// Returns `true` if the data is wrapped in the `Normal` variant,/// returns `false` otherwise.- ///pub fn is_normal(&self) -> bool {matches!(self, Self::Normal(_))}}/// Trait for providing a method on custom types for constructing `Maskable`-pub trait Mask {/// The type returned by the `into_masked()` method. Must implement `PartialEq`, `Eq` and `Clone`-type Output: Eq + Clone + PartialEq;- ////// Construct a `Maskable` instance that wraps `Self::Output` by consuming `self`- ///fn into_masked(self) -> Maskable<Self::Output>;}diff --git a/crates/masking/src/secret.rs b/crates/masking/src/secret.rsindex a813829d63..0bd28c3af9 100644--- a/crates/masking/src/secret.rs+++ b/crates/masking/src/secret.rs@@ -1,12 +1,9 @@-//!//! Structure describing secret.-//!use std::{fmt, marker::PhantomData};use crate::{strategy::Strategy, PeekInterface, StrongSecret};-////// Secret thing.////// To get access to value use method `expose()` of trait [`crate::ExposeInterface`].@@ -39,7 +36,6 @@ use crate::{strategy::Strategy, PeekInterface, StrongSecret};////// assert_eq!("hello", &format!("{:?}", my_secret));/// ```-///pub struct Secret<Secret, MaskingStrategy = crate::WithType>whereMaskingStrategy: Strategy<Secret>,diff --git a/crates/masking/src/serde.rs b/crates/masking/src/serde.rsindex 0c5782ae04..48514df8c6 100644--- a/crates/masking/src/serde.rs+++ b/crates/masking/src/serde.rs@@ -1,6 +1,4 @@-//!//! Serde-related.-//!pub use erased_serde::Serialize as ErasedSerialize;pub use serde::{de, Deserialize, Serialize, Serializer};@@ -17,7 +15,6 @@ use crate::{Secret, Strategy, StrongSecret, ZeroizableSecret};////// This is done deliberately to prevent accidental exfiltration of secrets/// via `serde` serialization.-///#[cfg_attr(docsrs, cfg(feature = "serde"))]pub trait SerializableSecret: Serialize {}@@ -87,7 +84,6 @@ where}}-////// Masked serialization.////// the default behaviour for secrets is to serialize in exposed format since the common use cases@@ -99,7 +95,6 @@ pub fn masked_serialize<T: Serialize>(value: &T) -> Result<Value, serde_json::Er})}-////// Masked serialization.////// Trait object for supporting serialization to Value while accounting for masking@@ -118,7 +113,7 @@ impl<T: Serialize + ErasedSerialize> ErasedMaskSerialize for T {}}-impl<'a> Serialize for dyn ErasedMaskSerialize + 'a {+impl Serialize for dyn ErasedMaskSerialize + '_ {fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>whereS: Serializer,@@ -127,7 +122,7 @@ impl<'a> Serialize for dyn ErasedMaskSerialize + 'a {}}-impl<'a> Serialize for dyn ErasedMaskSerialize + 'a + Send {+impl Serialize for dyn ErasedMaskSerialize + '_ + Send {fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>whereS: Serializer,diff --git a/crates/masking/src/string.rs b/crates/masking/src/string.rsindex 2638fbd282..be6e90a215 100644--- a/crates/masking/src/string.rs+++ b/crates/masking/src/string.rs@@ -1,4 +1,3 @@-//!//! Secret strings//!//! There is not alias type by design.diff --git a/crates/masking/src/strong_secret.rs b/crates/masking/src/strong_secret.rsindex 51c0f2cb3f..300b5463d2 100644--- a/crates/masking/src/strong_secret.rs+++ b/crates/masking/src/strong_secret.rs@@ -1,6 +1,4 @@-//!//! Structure describing secret.-//!use std::{fmt, marker::PhantomData};@@ -9,11 +7,9 @@ use zeroize::{self, Zeroize as ZeroizableSecret};use crate::{strategy::Strategy, PeekInterface};-////// Secret thing.////// To get access to value use method `expose()` of trait [`crate::ExposeInterface`].-///pub struct StrongSecret<Secret: ZeroizableSecret, MaskingStrategy = crate::WithType> {/// Inner secret valuepub(crate) inner_secret: Secret,diff --git a/crates/masking/src/vec.rs b/crates/masking/src/vec.rsindex 1f8c1c671e..2a077be994 100644--- a/crates/masking/src/vec.rs+++ b/crates/masking/src/vec.rs@@ -1,4 +1,3 @@-//!//! Secret `Vec` types//!//! There is not alias type by design.diff --git a/crates/openapi/src/routes/payments.rs b/crates/openapi/src/routes/payments.rsindex 2ffd4f4cdc..4c9d069a45 100644--- a/crates/openapi/src/routes/payments.rs+++ b/crates/openapi/src/routes/payments.rs@@ -549,8 +549,6 @@ pub fn payments_incremental_authorization() {}pub fn payments_external_authentication() {}/// Payments - Complete Authorize-///-///#[utoipa::path(post,path = "/{payment_id}/complete_authorize",@@ -569,8 +567,6 @@ pub fn payments_external_authentication() {}pub fn payments_complete_authorize() {}/// Dynamic Tax Calculation-///-///#[utoipa::path(post,path = "/payments/{payment_id}/calculate_tax",@@ -587,8 +583,6 @@ pub fn payments_complete_authorize() {}pub fn payments_dynamic_tax_calculation() {}/// Payments - Post Session Tokens-///-///#[utoipa::path(post,path = "/payments/{payment_id}/post_session_tokens",diff --git a/crates/openapi/src/routes/routing.rs b/crates/openapi/src/routes/routing.rsindex b144fd046a..9b8f56aeb8 100644--- a/crates/openapi/src/routes/routing.rs+++ b/crates/openapi/src/routes/routing.rs@@ -68,7 +68,6 @@ pub async fn routing_link_config() {}/// Routing - Retrieve////// Retrieve a routing algorithm-#[utoipa::path(get,path = "/routing/{routing_algorithm_id}",@@ -91,7 +90,6 @@ pub async fn routing_retrieve_config() {}/// Routing - Retrieve////// Retrieve a routing algorithm with its algorithm id-#[utoipa::path(get,path = "/v2/routing-algorithm/{id}",diff --git a/crates/pm_auth/src/connector/plaid/transformers.rs b/crates/pm_auth/src/connector/plaid/transformers.rsindex a91aa57a1e..a10ff0d60e 100644--- a/crates/pm_auth/src/connector/plaid/transformers.rs+++ b/crates/pm_auth/src/connector/plaid/transformers.rs@@ -20,7 +20,6 @@ pub struct PlaidLinkTokenRequest {}#[derive(Debug, Serialize, Eq, PartialEq)]-pub struct User {pub client_user_id: id_type::CustomerId,}@@ -94,7 +93,6 @@ pub struct PlaidExchangeTokenRequest {}#[derive(Debug, Deserialize, Eq, PartialEq)]-pub struct PlaidExchangeTokenResponse {pub access_token: String,}@@ -236,7 +234,6 @@ pub struct PlaidBankAccountCredentialsRequest {}#[derive(Debug, Deserialize, PartialEq)]-pub struct PlaidBankAccountCredentialsResponse {pub accounts: Vec<PlaidBankAccountCredentialsAccounts>,pub numbers: PlaidBankAccountCredentialsNumbers,@@ -251,7 +248,6 @@ pub struct BankAccountCredentialsOptions {}#[derive(Debug, Deserialize, PartialEq)]-pub struct PlaidBankAccountCredentialsAccounts {pub account_id: String,pub name: String,diff --git a/crates/redis_interface/src/commands.rs b/crates/redis_interface/src/commands.rsindex 9fd07a473d..746b424abc 100644--- a/crates/redis_interface/src/commands.rs+++ b/crates/redis_interface/src/commands.rs@@ -3,8 +3,6 @@//! The folder provides generic functions for providing serialization//! and deserialization while calling redis.//! It also includes instruments to provide tracing.-//!-//!use std::fmt::Debug;diff --git a/crates/redis_interface/src/errors.rs b/crates/redis_interface/src/errors.rsindex 0e2a4b8d63..9e0fb4639a 100644--- a/crates/redis_interface/src/errors.rs+++ b/crates/redis_interface/src/errors.rs@@ -1,6 +1,4 @@-//!//! Errors specific to this custom redis interface-//!#[derive(Debug, thiserror::Error, PartialEq)]pub enum RedisError {diff --git a/crates/redis_interface/src/types.rs b/crates/redis_interface/src/types.rsindex f40b81af68..92429f617d 100644--- a/crates/redis_interface/src/types.rs+++ b/crates/redis_interface/src/types.rs@@ -1,7 +1,5 @@-//!//! Data types and type conversions//! from `fred`'s internal data-types to custom data-types-//!use common_utils::errors::CustomResult;use fred::types::RedisValue as FredRedisValue;diff --git a/crates/router/src/connector/adyen/transformers.rs b/crates/router/src/connector/adyen/transformers.rsindex 12cef3aa9f..7daee6e73d 100644--- a/crates/router/src/connector/adyen/transformers.rs+++ b/crates/router/src/connector/adyen/transformers.rs@@ -1448,7 +1448,7 @@ pub enum OpenBankingUKIssuer {pub struct AdyenTestBankNames<'a>(&'a str);-impl<'a> TryFrom<&common_enums::BankNames> for AdyenTestBankNames<'a> {+impl TryFrom<&common_enums::BankNames> for AdyenTestBankNames<'_> {type Error = Error;fn try_from(bank: &common_enums::BankNames) -> Result<Self, Self::Error> {Ok(match bank {@@ -1501,7 +1501,7 @@ impl<'a> TryFrom<&common_enums::BankNames> for AdyenTestBankNames<'a> {pub struct AdyenBankNames<'a>(&'a str);-impl<'a> TryFrom<&common_enums::BankNames> for AdyenBankNames<'a> {+impl TryFrom<&common_enums::BankNames> for AdyenBankNames<'_> {type Error = Error;fn try_from(bank: &common_enums::BankNames) -> Result<Self, Self::Error> {Ok(match bank {@@ -1550,9 +1550,7 @@ impl TryFrom<&types::ConnectorAuthType> for AdyenAuthType {}}-impl<'a> TryFrom<&AdyenRouterData<&types::PaymentsAuthorizeRouterData>>- for AdyenPaymentRequest<'a>-{+impl TryFrom<&AdyenRouterData<&types::PaymentsAuthorizeRouterData>> for AdyenPaymentRequest<'_> {type Error = Error;fn try_from(item: &AdyenRouterData<&types::PaymentsAuthorizeRouterData>,@@ -1612,7 +1610,7 @@ impl<'a> TryFrom<&AdyenRouterData<&types::PaymentsAuthorizeRouterData>>}}-impl<'a> TryFrom<&types::PaymentsPreProcessingRouterData> for AdyenBalanceRequest<'a> {+impl TryFrom<&types::PaymentsPreProcessingRouterData> for AdyenBalanceRequest<'_> {type Error = Error;fn try_from(item: &types::PaymentsPreProcessingRouterData) -> Result<Self, Self::Error> {let payment_method = match &item.request.payment_method_data {@@ -1863,8 +1861,8 @@ fn build_shopper_reference(})}-impl<'a> TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)>- for AdyenPaymentMethod<'a>+impl TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)>+ for AdyenPaymentMethod<'_>{type Error = Error;fn try_from(@@ -1911,8 +1909,8 @@ impl<'a> TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)>}}-impl<'a> TryFrom<(&domain::VoucherData, &types::PaymentsAuthorizeRouterData)>- for AdyenPaymentMethod<'a>+impl TryFrom<(&domain::VoucherData, &types::PaymentsAuthorizeRouterData)>+ for AdyenPaymentMethod<'_>{type Error = Error;fn try_from(@@ -1958,7 +1956,7 @@ impl<'a> TryFrom<(&domain::VoucherData, &types::PaymentsAuthorizeRouterData)>}}-impl<'a> TryFrom<&domain::GiftCardData> for AdyenPaymentMethod<'a> {+impl TryFrom<&domain::GiftCardData> for AdyenPaymentMethod<'_> {type Error = Error;fn try_from(gift_card_data: &domain::GiftCardData) -> Result<Self, Self::Error> {match gift_card_data {@@ -1992,7 +1990,7 @@ fn get_adyen_card_network(card_network: common_enums::CardNetwork) -> Option<Car}}-impl<'a> TryFrom<(&domain::Card, Option<Secret<String>>)> for AdyenPaymentMethod<'a> {+impl TryFrom<(&domain::Card, Option<Secret<String>>)> for AdyenPaymentMethod<'_> {type Error = Error;fn try_from((card, card_holder_name): (&domain::Card, Option<Secret<String>>),@@ -2068,8 +2066,8 @@ impl TryFrom<&utils::CardIssuer> for CardBrand {}}-impl<'a> TryFrom<(&domain::WalletData, &types::PaymentsAuthorizeRouterData)>- for AdyenPaymentMethod<'a>+impl TryFrom<(&domain::WalletData, &types::PaymentsAuthorizeRouterData)>+ for AdyenPaymentMethod<'_>{type Error = Error;fn try_from(@@ -2206,7 +2204,7 @@ pub fn check_required_field<'a, T>(})}-impl<'a>+implTryFrom<(&domain::PayLaterData,&Option<api_enums::CountryAlpha2>,@@ -2216,7 +2214,7 @@ impl<'a>&Option<Secret<String>>,&Option<Address>,&Option<Address>,- )> for AdyenPaymentMethod<'a>+ )> for AdyenPaymentMethod<'_>{type Error = Error;fn try_from(@@ -2329,12 +2327,12 @@ impl<'a>}}-impl<'a>+implTryFrom<(&domain::BankRedirectData,Option<bool>,&types::PaymentsAuthorizeRouterData,- )> for AdyenPaymentMethod<'a>+ )> for AdyenPaymentMethod<'_>{type Error = Error;fn try_from(@@ -2492,11 +2490,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&domain::BankTransferData,&types::PaymentsAuthorizeRouterData,- )> for AdyenPaymentMethod<'a>+ )> for AdyenPaymentMethod<'_>{type Error = Error;fn try_from(@@ -2564,7 +2562,7 @@ fn get_optional_shopper_email(item: &types::PaymentsAuthorizeRouterData) -> Opti}}-impl<'a> TryFrom<&domain::payments::CardRedirectData> for AdyenPaymentMethod<'a> {+impl TryFrom<&domain::payments::CardRedirectData> for AdyenPaymentMethod<'_> {type Error = Error;fn try_from(card_redirect_data: &domain::payments::CardRedirectData,@@ -2583,11 +2581,11 @@ impl<'a> TryFrom<&domain::payments::CardRedirectData> for AdyenPaymentMethod<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,payments::MandateReferenceId,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;fn try_from(@@ -2719,11 +2717,11 @@ impl<'a>})}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::Card,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;fn try_from(@@ -2784,11 +2782,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::BankDebitData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;@@ -2842,11 +2840,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::VoucherData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;@@ -2903,11 +2901,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::BankTransferData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;@@ -2956,11 +2954,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::GiftCardData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;@@ -3009,11 +3007,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::BankRedirectData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;fn try_from(@@ -3117,11 +3115,11 @@ fn get_shopper_email(}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::WalletData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;fn try_from(@@ -3192,11 +3190,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::PayLaterData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;fn try_from(@@ -3268,11 +3266,11 @@ impl<'a>}}-impl<'a>+implTryFrom<(&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,&domain::payments::CardRedirectData,- )> for AdyenPaymentRequest<'a>+ )> for AdyenPaymentRequest<'_>{type Error = Error;fn try_from(@@ -5098,7 +5096,6 @@ impl TryFrom<&types::DefendDisputeRouterData> for AdyenDefendDisputeRequest {#[derive(Default, Debug, Serialize)]#[serde(rename_all = "camelCase")]-pub struct Evidence {defense_documents: Vec<DefenseDocuments>,merchant_account_code: Secret<String>,@@ -5107,7 +5104,6 @@ pub struct Evidence {#[derive(Default, Debug, Serialize)]#[serde(rename_all = "camelCase")]-pub struct DefenseDocuments {content: Secret<String>,content_type: Option<String>,diff --git a/crates/router/src/connector/braintree/transformers.rs b/crates/router/src/connector/braintree/transformers.rsindex 24c6118e44..00624ce0f9 100644--- a/crates/router/src/connector/braintree/transformers.rs+++ b/crates/router/src/connector/braintree/transformers.rs@@ -67,13 +67,11 @@ pub struct GenericVariableInput<T> {#[derive(Debug, Deserialize, Serialize)]#[serde(rename_all = "camelCase")]-pub struct BraintreeApiErrorResponse {pub api_error_response: ApiErrorResponse,}#[derive(Debug, Deserialize, Serialize)]-pub struct ErrorsObject {pub errors: Vec<ErrorObject>,@@ -82,7 +80,6 @@ pub struct ErrorsObject {#[derive(Debug, Deserialize, Serialize)]#[serde(rename_all = "camelCase")]-pub struct TransactionError {pub errors: Vec<ErrorObject>,pub credit_card: Option<CreditCardError>,@@ -122,7 +119,6 @@ pub struct BraintreeErrorResponse {#[derive(Debug, Deserialize, Serialize)]#[serde(rename_all = "camelCase")]#[serde(untagged)]-pub enum ErrorResponses {BraintreeApiErrorResponse(Box<BraintreeApiErrorResponse>),BraintreeErrorResponse(Box<BraintreeErrorResponse>),@@ -907,7 +903,6 @@ pub struct BraintreeRefundResponseData {}#[derive(Debug, Clone, Deserialize, Serialize)]-pub struct RefundResponse {pub data: BraintreeRefundResponseData,}diff --git a/crates/router/src/connector/datatrans.rs b/crates/router/src/connector/datatrans.rsindex 9c7772c5b3..e6f0ebd098 100644--- a/crates/router/src/connector/datatrans.rs+++ b/crates/router/src/connector/datatrans.rs@@ -4,8 +4,8 @@ use base64::Engine;use common_utils::types::{AmountConvertor, MinorUnit, MinorUnitForConnector};use error_stack::{report, ResultExt};use masking::PeekInterface;-use transformers::{self as datatrans};+use self::transformers as datatrans;use super::{utils as connector_utils, utils::RefundsRequestData};use crate::{configs::settings,diff --git a/crates/router/src/connector/globalpay/requests.rs b/crates/router/src/connector/globalpay/requests.rsindex 9ccfcd90be..223be54d3f 100644--- a/crates/router/src/connector/globalpay/requests.rs+++ b/crates/router/src/connector/globalpay/requests.rs@@ -99,7 +99,6 @@ pub struct GlobalpayRefreshTokenRequest {}#[derive(Debug, Serialize, Deserialize)]-pub struct CurrencyConversion {/// A unique identifier generated by Global Payments to identify the currency conversion. It/// can be used to reference a currency conversion when processing a sale or a refund@@ -108,7 +107,6 @@ pub struct CurrencyConversion {}#[derive(Debug, Serialize, Deserialize)]-pub struct Device {pub capabilities: Option<Capabilities>,@@ -128,7 +126,6 @@ pub struct Device {}#[derive(Debug, Serialize, Deserialize)]-pub struct Capabilities {pub authorization_modes: Option<Vec<AuthorizationMode>>,/// The number of lines that can be used to display information on the device.@@ -146,7 +143,6 @@ pub struct Capabilities {}#[derive(Debug, Serialize, Deserialize)]-pub struct Lodging {/// A reference that identifies the booking reference for a lodging stay.pub booking_reference: Option<String>,@@ -163,7 +159,6 @@ pub struct Lodging {}#[derive(Debug, Serialize, Deserialize)]-pub struct LodgingChargeItem {pub payment_method_program_codes: Option<Vec<PaymentMethodProgramCode>>,/// A reference that identifies the charge item, such as a lodging folio number.@@ -195,7 +190,6 @@ pub struct Notifications {}#[derive(Debug, Serialize, Deserialize)]-pub struct Order {/// Merchant defined field common to all transactions that are part of the same order.pub reference: Option<String>,@@ -239,7 +233,6 @@ pub struct PaymentMethod {}#[derive(Debug, Serialize, Deserialize)]-pub struct Apm {/// A string used to identify the payment method provider being used to execute this/// transaction.@@ -247,9 +240,7 @@ pub struct Apm {}/// Information outlining the degree of authentication executed related to a transaction.-#[derive(Debug, Serialize, Deserialize)]-pub struct Authentication {/// Information outlining the degree of 3D Secure authentication executed.pub three_ds: Option<ThreeDs>,@@ -259,9 +250,7 @@ pub struct Authentication {}/// Information outlining the degree of 3D Secure authentication executed.-#[derive(Debug, Serialize, Deserialize)]-pub struct ThreeDs {/// The reference created by the 3DSecure Directory Server to identify the specific/// authentication attempt.@@ -284,7 +273,6 @@ pub struct ThreeDs {}#[derive(Debug, Serialize, Deserialize)]-pub struct BankTransfer {/// The number or reference for the payer's bank account.pub account_number: Option<Secret<String>>,@@ -298,7 +286,6 @@ pub struct BankTransfer {pub sec_code: Option<SecCode>,}#[derive(Debug, Serialize, Deserialize)]-pub struct Bank {pub address: Option<Address>,/// The local identifier code for the bank.@@ -401,7 +388,6 @@ pub enum AuthorizationMode {/// requested amount./// pub example: PARTIAL///- ////// Describes whether the device can process partial authorizations.Partial,}@@ -428,7 +414,6 @@ pub enum CaptureMode {/// Describes whether the transaction was processed in a face to face(CP) scenario or a/// Customer Not Present (CNP) scenario.-#[derive(Debug, Default, Serialize, Deserialize)]pub enum Channel {#[default]@@ -609,7 +594,6 @@ pub enum NumberType {}/// Indicates how the transaction was authorized by the merchant.-#[derive(Debug, Serialize, Deserialize)]#[serde(rename_all = "SCREAMING_SNAKE_CASE")]pub enum SecCode {@@ -766,7 +750,6 @@ pub enum CardStorageMode {/// Indicates the transaction processing model being executed when using stored/// credentials.-#[derive(Debug, Serialize, Deserialize)]#[serde(rename_all = "SCREAMING_SNAKE_CASE")]pub enum Model {diff --git a/crates/router/src/connector/paypal/transformers.rs b/crates/router/src/connector/paypal/transformers.rsindex 7f2d0d0e60..c350f151d7 100644--- a/crates/router/src/connector/paypal/transformers.rs+++ b/crates/router/src/connector/paypal/transformers.rs@@ -2970,7 +2970,6 @@ pub struct PaypalSourceVerificationRequest {}#[derive(Deserialize, Serialize, Debug)]-pub struct PaypalSourceVerificationResponse {pub verification_status: PaypalSourceVerificationStatus,}diff --git a/crates/router/src/connector/riskified/transformers/api.rs b/crates/router/src/connector/riskified/transformers/api.rsindex c2da0193f9..2d519b3caa 100644--- a/crates/router/src/connector/riskified/transformers/api.rs+++ b/crates/router/src/connector/riskified/transformers/api.rs@@ -657,7 +657,6 @@ fn get_fulfillment_status(}#[derive(Debug, Clone, Deserialize, Serialize)]-pub struct RiskifiedWebhookBody {pub id: String,pub status: RiskifiedWebhookStatus,diff --git a/crates/router/src/connector/signifyd/transformers/api.rs b/crates/router/src/connector/signifyd/transformers/api.rsindex 348ca3d099..028c0e8251 100644--- a/crates/router/src/connector/signifyd/transformers/api.rs+++ b/crates/router/src/connector/signifyd/transformers/api.rs@@ -702,7 +702,6 @@ impl TryFrom<&frm_types::FrmRecordReturnRouterData> for SignifydPaymentsRecordRe#[derive(Debug, Clone, Deserialize, Serialize)]#[serde(rename_all = "camelCase")]-pub struct SignifydWebhookBody {pub order_id: String,pub review_disposition: ReviewDisposition,diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rsindex ed4b97e2a9..b5901f56d3 100644--- a/crates/router/src/connector/utils.rs+++ b/crates/router/src/connector/utils.rs@@ -54,7 +54,7 @@ use crate::{pub fn missing_field_err(message: &'static str,-) -> Box<dyn Fn() -> error_stack::Report<errors::ConnectorError> + '_> {+) -> Box<dyn Fn() -> error_stack::Report<errors::ConnectorError> + 'static> {Box::new(move || {errors::ConnectorError::MissingRequiredField {field_name: message,diff --git a/crates/router/src/connector/wellsfargopayout.rs b/crates/router/src/connector/wellsfargopayout.rsindex 51b303494b..fe8f5dda25 100644--- a/crates/router/src/connector/wellsfargopayout.rs+++ b/crates/router/src/connector/wellsfargopayout.rs@@ -3,9 +3,9 @@ pub mod transformers;use common_utils::types::{AmountConvertor, StringMinorUnit, StringMinorUnitForConnector};use error_stack::{report, ResultExt};use masking::ExposeInterface;-use transformers as wellsfargopayout;-use super::utils::{self as connector_utils};+use self::transformers as wellsfargopayout;+use super::utils as connector_utils;use crate::{configs::settings,core::errors::{self, CustomResult},diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rsindex 6d4dde5308..055c428b1f 100644--- a/crates/router/src/core/admin.rs+++ b/crates/router/src/core/admin.rs@@ -1199,7 +1199,7 @@ struct ConnectorAuthTypeAndMetadataValidation<'a> {connector_meta_data: &'a Option<pii::SecretSerdeValue>,}-impl<'a> ConnectorAuthTypeAndMetadataValidation<'a> {+impl ConnectorAuthTypeAndMetadataValidation<'_> {pub fn validate_auth_and_metadata_type(&self,) -> Result<(), error_stack::Report<errors::ApiErrorResponse>> {@@ -1576,7 +1576,7 @@ struct ConnectorAuthTypeValidation<'a> {auth_type: &'a types::ConnectorAuthType,}-impl<'a> ConnectorAuthTypeValidation<'a> {+impl ConnectorAuthTypeValidation<'_> {fn validate_connector_auth_type(&self,) -> Result<(), error_stack::Report<errors::ApiErrorResponse>> {@@ -1666,7 +1666,7 @@ struct ConnectorStatusAndDisabledValidation<'a> {current_status: &'a api_enums::ConnectorStatus,}-impl<'a> ConnectorStatusAndDisabledValidation<'a> {+impl ConnectorStatusAndDisabledValidation<'_> {fn validate_status_and_disabled(&self,) -> RouterResult<(api_enums::ConnectorStatus, Option<bool>)> {@@ -1709,7 +1709,7 @@ struct PaymentMethodsEnabled<'a> {payment_methods_enabled: &'a Option<Vec<api_models::admin::PaymentMethodsEnabled>>,}-impl<'a> PaymentMethodsEnabled<'a> {+impl PaymentMethodsEnabled<'_> {fn get_payment_methods_enabled(&self) -> RouterResult<Option<Vec<pii::SecretSerdeValue>>> {let mut vec = Vec::new();let payment_methods_enabled = match self.payment_methods_enabled.clone() {@@ -1735,7 +1735,7 @@ struct ConnectorMetadata<'a> {connector_metadata: &'a Option<pii::SecretSerdeValue>,}-impl<'a> ConnectorMetadata<'a> {+impl ConnectorMetadata<'_> {fn validate_apple_pay_certificates_in_mca_metadata(&self) -> RouterResult<()> {self.connector_metadata.clone()@@ -1826,7 +1826,7 @@ struct ConnectorTypeAndConnectorName<'a> {connector_name: &'a api_enums::Connector,}-impl<'a> ConnectorTypeAndConnectorName<'a> {+impl ConnectorTypeAndConnectorName<'_> {fn get_routable_connector(&self) -> RouterResult<Option<api_enums::RoutableConnectors>> {let mut routable_connector =api_enums::RoutableConnectors::from_str(&self.connector_name.to_string()).ok();diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rsindex 9cfe6e6ec7..ad612ed6f3 100644--- a/crates/router/src/core/payment_methods/cards.rs+++ b/crates/router/src/core/payment_methods/cards.rs@@ -3149,7 +3149,7 @@ pub fn get_banks(.iter().skip(1).fold(first_element.to_owned(), |acc, hs| {- acc.intersection(hs).cloned().collect()+ acc.intersection(hs).copied().collect()});}@@ -3617,7 +3617,7 @@ pub async fn list_payment_methods(.transpose().change_context(errors::ApiErrorResponse::InternalServerError).attach_printable("Invalid PaymentRoutingInfo format found in payment attempt")?- .unwrap_or_else(|| storage::PaymentRoutingInfo {+ .unwrap_or(storage::PaymentRoutingInfo {algorithm: None,pre_routing_results: None,});diff --git a/crates/router/src/core/payment_methods/utils.rs b/crates/router/src/core/payment_methods/utils.rsindex 1afdaaab06..604e8c7062 100644--- a/crates/router/src/core/payment_methods/utils.rs+++ b/crates/router/src/core/payment_methods/utils.rs@@ -737,7 +737,7 @@ fn compile_accepted_currency_for_mca(let config_currency: Vec<common_enums::Currency> =Vec::from_iter(config_currencies).into_iter()- .cloned()+ .copied().collect();let dir_currencies: Vec<dir::DirValue> = config_currency@@ -767,7 +767,7 @@ fn compile_accepted_currency_for_mca(let config_currency: Vec<common_enums::Currency> =Vec::from_iter(config_currencies).into_iter()- .cloned()+ .copied().collect();let dir_currencies: Vec<dir::DirValue> = config_currencydiff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rsindex fd61fcacf5..684293151e 100644--- a/crates/router/src/core/payments.rs+++ b/crates/router/src/core/payments.rs@@ -4312,7 +4312,7 @@ pub fn if_not_create_change_operation<'a, Op, F>(status: storage_enums::IntentStatus,confirm: Option<bool>,current: &'a Op,-) -> BoxedOperation<'_, F, api::PaymentsRequest, PaymentData<F>>+) -> BoxedOperation<'a, F, api::PaymentsRequest, PaymentData<F>>whereF: Send + Clone,Op: Operation<F, api::PaymentsRequest, Data = PaymentData<F>> + Send + Sync,@@ -4336,7 +4336,7 @@ wherepub fn is_confirm<'a, F: Clone + Send, R, Op>(operation: &'a Op,confirm: Option<bool>,-) -> BoxedOperation<'_, F, R, PaymentData<F>>+) -> BoxedOperation<'a, F, R, PaymentData<F>>wherePaymentConfirm: Operation<F, R, Data = PaymentData<F>>,&'a PaymentConfirm: Operation<F, R, Data = PaymentData<F>>,@@ -5044,7 +5044,7 @@ where.transpose().change_context(errors::ApiErrorResponse::InternalServerError).attach_printable("Invalid straight through algorithm format found in payment attempt")?- .unwrap_or_else(|| storage::PaymentRoutingInfo {+ .unwrap_or(storage::PaymentRoutingInfo {algorithm: None,pre_routing_results: None,}),diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rsindex 219a4d9051..e7de03804d 100644--- a/crates/router/src/core/payments/helpers.rs+++ b/crates/router/src/core/payments/helpers.rs@@ -19,7 +19,7 @@ use common_utils::{MinorUnit,},};-use diesel_models::enums::{self};+use diesel_models::enums;// TODO : Evaluate all the helper functions ()use error_stack::{report, ResultExt};use futures::future::Either;diff --git a/crates/router/src/core/pm_auth/transformers.rs b/crates/router/src/core/pm_auth/transformers.rsindex d516cab62f..b8a855f533 100644--- a/crates/router/src/core/pm_auth/transformers.rs+++ b/crates/router/src/core/pm_auth/transformers.rs@@ -1,4 +1,4 @@-use pm_auth::types::{self as pm_auth_types};+use pm_auth::types as pm_auth_types;use crate::{core::errors, types, types::transformers::ForeignTryFrom};diff --git a/crates/router/src/core/refunds.rs b/crates/router/src/core/refunds.rsindex c706d8854a..ebc4c92659 100644--- a/crates/router/src/core/refunds.rs+++ b/crates/router/src/core/refunds.rs@@ -914,7 +914,6 @@ pub async fn validate_and_create_refund(/// If payment-id is provided, lists all the refunds associated with that particular payment-id/// If payment-id is not provided, lists the refunds associated with that particular merchant - to the limit specified,if no limits given, it is 10 by default-#[instrument(skip_all)]#[cfg(feature = "olap")]pub async fn refund_list(diff --git a/crates/router/src/core/routing/helpers.rs b/crates/router/src/core/routing/helpers.rsindex 264328796c..c22a5021a2 100644--- a/crates/router/src/core/routing/helpers.rs+++ b/crates/router/src/core/routing/helpers.rs@@ -356,7 +356,7 @@ impl MerchantConnectorAccounts {}#[cfg(feature = "v2")]-impl<'h> RoutingAlgorithmHelpers<'h> {+impl RoutingAlgorithmHelpers<'_> {fn connector_choice(&self,choice: &routing_types::RoutableConnectorChoice,diff --git a/crates/router/src/core/user.rs b/crates/router/src/core/user.rsindex 1168ea87bf..039e891e42 100644--- a/crates/router/src/core/user.rs+++ b/crates/router/src/core/user.rs@@ -216,12 +216,12 @@ pub async fn connect_account(.await;logger::info!(?send_email_result);- return Ok(ApplicationResponse::Json(+ Ok(ApplicationResponse::Json(user_api::ConnectAccountResponse {is_email_sent: send_email_result.is_ok(),user_id: user_from_db.get_user_id().to_string(),},- ));+ ))} else if find_user.as_ref().map_err(|e| e.current_context().is_db_not_found())diff --git a/crates/router/src/core/user_role/role.rs b/crates/router/src/core/user_role/role.rsindex 0250415d4f..c01d585feb 100644--- a/crates/router/src/core/user_role/role.rs+++ b/crates/router/src/core/user_role/role.rs@@ -1,6 +1,6 @@use std::collections::HashSet;-use api_models::user_role::role::{self as role_api};+use api_models::user_role::role as role_api;use common_enums::{EntityType, ParentGroup, PermissionGroup, RoleScope};use common_utils::generate_id_with_default_len;use diesel_models::role::{RoleNew, RoleUpdate};diff --git a/crates/router/src/db/user_authentication_method.rs b/crates/router/src/db/user_authentication_method.rsindex bcc2313d5d..a02e7bdb11 100644--- a/crates/router/src/db/user_authentication_method.rs+++ b/crates/router/src/db/user_authentication_method.rs@@ -1,4 +1,4 @@-use diesel_models::user_authentication_method::{self as storage};+use diesel_models::user_authentication_method as storage;use error_stack::report;use router_env::{instrument, tracing};diff --git a/crates/router/src/routes/payment_link.rs b/crates/router/src/routes/payment_link.rsindex 783566335b..71f10fe73e 100644--- a/crates/router/src/routes/payment_link.rs+++ b/crates/router/src/routes/payment_link.rs@@ -26,7 +26,6 @@ use crate::{security(("api_key" = []), ("publishable_key" = [])))]#[instrument(skip(state, req), fields(flow = ?Flow::PaymentLinkRetrieve))]-pub async fn payment_link_retrieve(state: web::Data<AppState>,req: actix_web::HttpRequest,diff --git a/crates/router/src/routes/payments.rs b/crates/router/src/routes/payments.rsindex 93f50f3ed9..27a5462c05 100644--- a/crates/router/src/routes/payments.rs+++ b/crates/router/src/routes/payments.rs@@ -1977,7 +1977,7 @@ impl GetLockingInput for payment_types::PaymentsCaptureRequest {struct FPaymentsApproveRequest<'a>(&'a payment_types::PaymentsApproveRequest);#[cfg(feature = "oltp")]-impl<'a> GetLockingInput for FPaymentsApproveRequest<'a> {+impl GetLockingInput for FPaymentsApproveRequest<'_> {fn get_locking_input<F>(&self, flow: F) -> api_locking::LockActionwhereF: types::FlowMetric,@@ -1997,7 +1997,7 @@ impl<'a> GetLockingInput for FPaymentsApproveRequest<'a> {struct FPaymentsRejectRequest<'a>(&'a payment_types::PaymentsRejectRequest);#[cfg(feature = "oltp")]-impl<'a> GetLockingInput for FPaymentsRejectRequest<'a> {+impl GetLockingInput for FPaymentsRejectRequest<'_> {fn get_locking_input<F>(&self, flow: F) -> api_locking::LockActionwhereF: types::FlowMetric,diff --git a/crates/router/src/services/api/client.rs b/crates/router/src/services/api/client.rsindex e1f113633a..9a496c18d9 100644--- a/crates/router/src/services/api/client.rs+++ b/crates/router/src/services/api/client.rs@@ -403,9 +403,7 @@ impl ApiClient for ProxyClient {fn add_flow_name(&mut self, _flow_name: String) {}}-////// Api client for testing sending request-///#[derive(Clone)]pub struct MockApiClient;diff --git a/crates/router/src/services/authentication/decision.rs b/crates/router/src/services/authentication/decision.rsindex c31a4696bc..4ff9f8401b 100644--- a/crates/router/src/services/authentication/decision.rs+++ b/crates/router/src/services/authentication/decision.rs@@ -179,10 +179,7 @@ pub async fn revoke_api_key(call_decision_service(state, decision_config, rule, RULE_DELETE_METHOD).await}-///-////// Safety: i64::MAX < u64::MAX-///#[allow(clippy::as_conversions)]pub fn convert_expiry(expiry: time::PrimitiveDateTime) -> u64 {let now = common_utils::date_time::now();diff --git a/crates/router/src/services/kafka.rs b/crates/router/src/services/kafka.rsindex 51ae9456ec..91968510a6 100644--- a/crates/router/src/services/kafka.rs+++ b/crates/router/src/services/kafka.rs@@ -94,7 +94,7 @@ impl<'a, T: KafkaMessage> KafkaEvent<'a, T> {}}-impl<'a, T: KafkaMessage> KafkaMessage for KafkaEvent<'a, T> {+impl<T: KafkaMessage> KafkaMessage for KafkaEvent<'_, T> {fn key(&self) -> String {self.event.key()}@@ -130,7 +130,7 @@ impl<'a, T: KafkaMessage> KafkaConsolidatedEvent<'a, T> {}}-impl<'a, T: KafkaMessage> KafkaMessage for KafkaConsolidatedEvent<'a, T> {+impl<T: KafkaMessage> KafkaMessage for KafkaConsolidatedEvent<'_, T> {fn key(&self) -> String {self.log.event.key()}diff --git a/crates/router/src/services/kafka/authentication.rs b/crates/router/src/services/kafka/authentication.rsindex 67e488d6c8..5cf2d066ee 100644--- a/crates/router/src/services/kafka/authentication.rs+++ b/crates/router/src/services/kafka/authentication.rs@@ -86,7 +86,7 @@ impl<'a> KafkaAuthentication<'a> {}}-impl<'a> super::KafkaMessage for KafkaAuthentication<'a> {+impl super::KafkaMessage for KafkaAuthentication<'_> {fn key(&self) -> String {format!("{}_{}",diff --git a/crates/router/src/services/kafka/authentication_event.rs b/crates/router/src/services/kafka/authentication_event.rsindex 7c8b77a384..4169ff7b42 100644--- a/crates/router/src/services/kafka/authentication_event.rs+++ b/crates/router/src/services/kafka/authentication_event.rs@@ -87,7 +87,7 @@ impl<'a> KafkaAuthenticationEvent<'a> {}}-impl<'a> super::KafkaMessage for KafkaAuthenticationEvent<'a> {+impl super::KafkaMessage for KafkaAuthenticationEvent<'_> {fn key(&self) -> String {format!("{}_{}",diff --git a/crates/router/src/services/kafka/dispute.rs b/crates/router/src/services/kafka/dispute.rsindex cc3a538851..4414af494f 100644--- a/crates/router/src/services/kafka/dispute.rs+++ b/crates/router/src/services/kafka/dispute.rs@@ -71,7 +71,7 @@ impl<'a> KafkaDispute<'a> {}}-impl<'a> super::KafkaMessage for KafkaDispute<'a> {+impl super::KafkaMessage for KafkaDispute<'_> {fn key(&self) -> String {format!("{}_{}_{}",diff --git a/crates/router/src/services/kafka/dispute_event.rs b/crates/router/src/services/kafka/dispute_event.rsindex 64d91e8aca..92327c044d 100644--- a/crates/router/src/services/kafka/dispute_event.rs+++ b/crates/router/src/services/kafka/dispute_event.rs@@ -72,7 +72,7 @@ impl<'a> KafkaDisputeEvent<'a> {}}-impl<'a> super::KafkaMessage for KafkaDisputeEvent<'a> {+impl super::KafkaMessage for KafkaDisputeEvent<'_> {fn key(&self) -> String {format!("{}_{}_{}",diff --git a/crates/router/src/services/kafka/fraud_check.rs b/crates/router/src/services/kafka/fraud_check.rsindex 26fa9e6b4e..3010f85753 100644--- a/crates/router/src/services/kafka/fraud_check.rs+++ b/crates/router/src/services/kafka/fraud_check.rs@@ -53,7 +53,7 @@ impl<'a> KafkaFraudCheck<'a> {}}-impl<'a> super::KafkaMessage for KafkaFraudCheck<'a> {+impl super::KafkaMessage for KafkaFraudCheck<'_> {fn key(&self) -> String {format!("{}_{}_{}_{}",diff --git a/crates/router/src/services/kafka/fraud_check_event.rs b/crates/router/src/services/kafka/fraud_check_event.rsindex f35748cb1c..4fd7117441 100644--- a/crates/router/src/services/kafka/fraud_check_event.rs+++ b/crates/router/src/services/kafka/fraud_check_event.rs@@ -52,7 +52,7 @@ impl<'a> KafkaFraudCheckEvent<'a> {}}-impl<'a> super::KafkaMessage for KafkaFraudCheckEvent<'a> {+impl super::KafkaMessage for KafkaFraudCheckEvent<'_> {fn key(&self) -> String {format!("{}_{}_{}_{}",diff --git a/crates/router/src/services/kafka/payment_attempt.rs b/crates/router/src/services/kafka/payment_attempt.rsindex e585b21d4b..adfff7450b 100644--- a/crates/router/src/services/kafka/payment_attempt.rs+++ b/crates/router/src/services/kafka/payment_attempt.rs@@ -180,7 +180,7 @@ impl<'a> KafkaPaymentAttempt<'a> {}}-impl<'a> super::KafkaMessage for KafkaPaymentAttempt<'a> {+impl super::KafkaMessage for KafkaPaymentAttempt<'_> {fn key(&self) -> String {format!("{}_{}_{}",diff --git a/crates/router/src/services/kafka/payment_attempt_event.rs b/crates/router/src/services/kafka/payment_attempt_event.rsindex cbce46ad9c..177b211ae8 100644--- a/crates/router/src/services/kafka/payment_attempt_event.rs+++ b/crates/router/src/services/kafka/payment_attempt_event.rs@@ -181,7 +181,7 @@ impl<'a> KafkaPaymentAttemptEvent<'a> {}}-impl<'a> super::KafkaMessage for KafkaPaymentAttemptEvent<'a> {+impl super::KafkaMessage for KafkaPaymentAttemptEvent<'_> {fn key(&self) -> String {format!("{}_{}_{}",diff --git a/crates/router/src/services/kafka/payment_intent.rs b/crates/router/src/services/kafka/payment_intent.rsindex 82e33de8c6..378bddf193 100644--- a/crates/router/src/services/kafka/payment_intent.rs+++ b/crates/router/src/services/kafka/payment_intent.rs@@ -180,7 +180,7 @@ impl KafkaPaymentIntent<'_> {}}-impl<'a> super::KafkaMessage for KafkaPaymentIntent<'a> {+impl super::KafkaMessage for KafkaPaymentIntent<'_> {fn key(&self) -> String {format!("{}_{}",diff --git a/crates/router/src/services/kafka/payment_intent_event.rs b/crates/router/src/services/kafka/payment_intent_event.rsindex 5657846ca4..7509f71162 100644--- a/crates/router/src/services/kafka/payment_intent_event.rs+++ b/crates/router/src/services/kafka/payment_intent_event.rs@@ -182,7 +182,7 @@ impl<'a> KafkaPaymentIntentEvent<'a> {}}-impl<'a> super::KafkaMessage for KafkaPaymentIntentEvent<'a> {+impl super::KafkaMessage for KafkaPaymentIntentEvent<'_> {fn key(&self) -> String {format!("{}_{}",diff --git a/crates/router/src/services/kafka/payout.rs b/crates/router/src/services/kafka/payout.rsindex 7a6254bd52..babf7c1c56 100644--- a/crates/router/src/services/kafka/payout.rs+++ b/crates/router/src/services/kafka/payout.rs@@ -77,7 +77,7 @@ impl<'a> KafkaPayout<'a> {}}-impl<'a> super::KafkaMessage for KafkaPayout<'a> {+impl super::KafkaMessage for KafkaPayout<'_> {fn key(&self) -> String {format!("{}_{}",diff --git a/crates/router/src/services/kafka/refund.rs b/crates/router/src/services/kafka/refund.rsindex 7eff6f881b..a7e37930cf 100644--- a/crates/router/src/services/kafka/refund.rs+++ b/crates/router/src/services/kafka/refund.rs@@ -66,7 +66,7 @@ impl<'a> KafkaRefund<'a> {}}-impl<'a> super::KafkaMessage for KafkaRefund<'a> {+impl super::KafkaMessage for KafkaRefund<'_> {fn key(&self) -> String {format!("{}_{}_{}_{}",diff --git a/crates/router/src/services/kafka/refund_event.rs b/crates/router/src/services/kafka/refund_event.rsindex 8f9f77878a..74278944b0 100644--- a/crates/router/src/services/kafka/refund_event.rs+++ b/crates/router/src/services/kafka/refund_event.rs@@ -67,7 +67,7 @@ impl<'a> KafkaRefundEvent<'a> {}}-impl<'a> super::KafkaMessage for KafkaRefundEvent<'a> {+impl super::KafkaMessage for KafkaRefundEvent<'_> {fn key(&self) -> String {format!("{}_{}_{}_{}",diff --git a/crates/router/src/services/logger.rs b/crates/router/src/services/logger.rsindex 7dfd7abb84..e88d4072f9 100644--- a/crates/router/src/services/logger.rs+++ b/crates/router/src/services/logger.rs@@ -1,5 +1,3 @@-//!//! Logger of the system.-//!pub use crate::logger::*;diff --git a/crates/router/src/types/storage/payment_link.rs b/crates/router/src/types/storage/payment_link.rsindex 9a251d760b..ae9aa41732 100644--- a/crates/router/src/types/storage/payment_link.rs+++ b/crates/router/src/types/storage/payment_link.rs@@ -11,8 +11,8 @@ use crate::{core::errors::{self, CustomResult},logger,};-#[async_trait::async_trait]+#[async_trait::async_trait]pub trait PaymentLinkDbExt: Sized {async fn filter_by_constraints(conn: &PgPooledConn,diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rsindex 4ae0266895..210ae71520 100644--- a/crates/router/src/types/transformers.rs+++ b/crates/router/src/types/transformers.rs@@ -701,7 +701,7 @@ impl ForeignFrom<storage::Config> for api_types::Config {}}-impl<'a> ForeignFrom<&'a api_types::ConfigUpdate> for storage::ConfigUpdate {+impl ForeignFrom<&api_types::ConfigUpdate> for storage::ConfigUpdate {fn foreign_from(config: &api_types::ConfigUpdate) -> Self {Self::Update {config: Some(config.value.clone()),@@ -709,7 +709,7 @@ impl<'a> ForeignFrom<&'a api_types::ConfigUpdate> for storage::ConfigUpdate {}}-impl<'a> From<&'a domain::Address> for api_types::Address {+impl From<&domain::Address> for api_types::Address {fn from(address: &domain::Address) -> Self {// If all the fields of address are none, then pass the address as Nonelet address_details = if address.city.is_none()diff --git a/crates/router/src/utils/user_role.rs b/crates/router/src/utils/user_role.rsindex 0bd0e81149..8acab43649 100644--- a/crates/router/src/utils/user_role.rs+++ b/crates/router/src/utils/user_role.rs@@ -25,7 +25,7 @@ pub fn validate_role_groups(groups: &[PermissionGroup]) -> UserResult<()> {.attach_printable("Role groups cannot be empty");}- let unique_groups: HashSet<_> = groups.iter().cloned().collect();+ let unique_groups: HashSet<_> = groups.iter().copied().collect();if unique_groups.contains(&PermissionGroup::OrganizationManage) {return Err(report!(UserErrors::InvalidRoleOperation))diff --git a/crates/router/src/workflows/payment_sync.rs b/crates/router/src/workflows/payment_sync.rsindex b4fcf69241..04fa164849 100644--- a/crates/router/src/workflows/payment_sync.rs+++ b/crates/router/src/workflows/payment_sync.rs@@ -243,7 +243,6 @@ impl ProcessTrackerWorkflow<SessionState> for PaymentsSyncWorkflow {/// `start_after`: The first psync should happen after 60 seconds////// `frequency` and `count`: The next 5 retries should have an interval of 300 seconds between them-///pub async fn get_sync_process_schedule_time(db: &dyn StorageInterface,connector: &str,diff --git a/crates/router/tests/connectors/aci.rs b/crates/router/tests/connectors/aci.rsindex 92cba2eec3..751359c776 100644--- a/crates/router/tests/connectors/aci.rs+++ b/crates/router/tests/connectors/aci.rs@@ -205,7 +205,6 @@ fn construct_refund_router_data<F>() -> types::RefundsRouterData<F> {}#[actix_web::test]-async fn payments_create_success() {let conf = Settings::new().unwrap();let tx: oneshot::Sender<()> = oneshot::channel().0;@@ -314,7 +313,6 @@ async fn payments_create_failure() {}#[actix_web::test]-async fn refund_for_successful_payments() {let conf = Settings::new().unwrap();use router::connector::Aci;diff --git a/crates/router_derive/src/lib.rs b/crates/router_derive/src/lib.rsindex 33edd5e215..d1fb543318 100644--- a/crates/router_derive/src/lib.rs+++ b/crates/router_derive/src/lib.rs@@ -166,7 +166,6 @@ pub fn diesel_enum(/// }/// ```///-/// # Panics////// Panics if a struct without named fields is provided as input to the macro@@ -505,7 +504,6 @@ pub fn operation_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStre/// payment_method: String,/// }/// ```-#[proc_macro_derive(PolymorphicSchema,attributes(mandatory_in, generate_schemas, remove_in)@@ -620,6 +618,7 @@ pub fn try_get_enum_variant(input: proc_macro::TokenStream) -> proc_macro::Token////// Example///+/// ```/// #[derive(Default, Serialize, FlatStruct)]/// pub struct User {/// name: String,@@ -644,7 +643,7 @@ pub fn try_get_enum_variant(input: proc_macro::TokenStream) -> proc_macro::Token/// ("address.zip", "941222"),/// ("email", "[email protected]"),/// ]-///+/// ```#[proc_macro_derive(FlatStruct)]pub fn flat_struct_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {let input = parse_macro_input!(input as syn::DeriveInput);diff --git a/crates/router_derive/src/macros/operation.rs b/crates/router_derive/src/macros/operation.rsindex 407e910b29..a096c236b2 100644--- a/crates/router_derive/src/macros/operation.rs+++ b/crates/router_derive/src/macros/operation.rs@@ -5,7 +5,7 @@ use quote::{quote, ToTokens};use strum::IntoEnumIterator;use syn::{self, parse::Parse, DeriveInput};-use crate::macros::helpers::{self};+use crate::macros::helpers;#[derive(Debug, Clone, Copy, strum::EnumString, strum::EnumIter, strum::Display)]#[strum(serialize_all = "snake_case")]diff --git a/crates/router_env/src/lib.rs b/crates/router_env/src/lib.rsindex 0d46f8ac33..9b3aec4c94 100644--- a/crates/router_env/src/lib.rs+++ b/crates/router_env/src/lib.rs@@ -1,8 +1,6 @@#![warn(missing_debug_implementations)]-//!//! Environment of payment router: logger, basic config, its environment awareness.-//!#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR" ), "/", "README.md"))]diff --git a/crates/router_env/src/logger/mod.rs b/crates/router_env/src/logger.rssimilarity index 98%rename from crates/router_env/src/logger/mod.rsrename to crates/router_env/src/logger.rsindex a7aa0610e9..2b0ae49b1f 100644--- a/crates/router_env/src/logger/mod.rs+++ b/crates/router_env/src/logger.rs@@ -1,6 +1,4 @@-//!//! Logger of the system.-//!pub use tracing::{debug, error, event as log, info, warn};pub use tracing_attributes::instrument;diff --git a/crates/router_env/src/logger/config.rs b/crates/router_env/src/logger/config.rsindex 03cc9ac17b..746c8ee958 100644--- a/crates/router_env/src/logger/config.rs+++ b/crates/router_env/src/logger/config.rs@@ -1,6 +1,4 @@-//!//! Logger-specific config.-//!use std::path::PathBuf;diff --git a/crates/router_env/src/logger/formatter.rs b/crates/router_env/src/logger/formatter.rsindex 6bcf669e73..5c3341026c 100644--- a/crates/router_env/src/logger/formatter.rs+++ b/crates/router_env/src/logger/formatter.rs@@ -1,6 +1,4 @@-//!//! Formatting [layer](https://docs.rs/tracing-subscriber/0.3.15/tracing_subscriber/layer/trait.Layer.html) for Router.-//!use std::{collections::{HashMap, HashSet},@@ -117,10 +115,8 @@ impl fmt::Display for RecordType {}}-////// Format log records./// `FormattingLayer` relies on the `tracing_bunyan_formatter::JsonStorageLayer` which is storage of entries.-///#[derive(Debug)]pub struct FormattingLayer<W, F>where@@ -145,7 +141,6 @@ whereW: for<'a> MakeWriter<'a> + 'static,F: Formatter + Clone,{- ////// Constructor of `FormattingLayer`.////// A `name` will be attached to all records during formatting.@@ -155,7 +150,6 @@ where/// ```rust/// let formatting_layer = router_env::FormattingLayer::new("my_service", std::io::stdout, serde_json::ser::CompactFormatter);/// ```- ///pub fn new(service: &str,dst_writer: W,@@ -296,11 +290,9 @@ whereOk(())}- ////// Flush memory buffer into an output stream trailing it with next line.////// Should be done by single `write_all` call to avoid fragmentation of log because of mutlithreading.- ///fn flush(&self, mut buffer: Vec<u8>) -> Result<(), std::io::Error> {buffer.write_all(b"\n")?;self.dst_writer.make_writer().write_all(&buffer)@@ -361,12 +353,9 @@ whereOk(buffer)}- ////// Format message of a span.////// Example: "[FN_WITHOUT_COLON - START]"- ///-fn span_message<S>(span: &SpanRef<'_, S>, ty: RecordType) -> StringwhereS: Subscriber + for<'a> LookupSpan<'a>,@@ -374,12 +363,9 @@ whereformat!("[{} - {}]", span.metadata().name().to_uppercase(), ty)}- ////// Format message of an event.////// Examples: "[FN_WITHOUT_COLON - EVENT] Message"- ///-fn event_message<S>(span: &Option<&SpanRef<'_, S>>,event: &Event<'_>,diff --git a/crates/router_env/src/logger/setup.rs b/crates/router_env/src/logger/setup.rsindex 428112fb37..6433172edf 100644--- a/crates/router_env/src/logger/setup.rs+++ b/crates/router_env/src/logger/setup.rs@@ -181,9 +181,7 @@ struct TraceAssertion {}impl TraceAssertion {- ////// Should the provided url be traced- ///fn should_trace_url(&self, url: &str) -> bool {match &self.clauses {Some(clauses) => clauses.iter().all(|cur| cur.compare_url(url)),@@ -192,9 +190,7 @@ impl TraceAssertion {}}-////// Conditional Sampler for providing control on url based tracing-///#[derive(Clone, Debug)]struct ConditionalSampler<T: trace::ShouldSample + Clone + 'static>(TraceAssertion, T);diff --git a/crates/router_env/src/logger/storage.rs b/crates/router_env/src/logger/storage.rsindex ce220680bb..cdaf06ecf9 100644--- a/crates/router_env/src/logger/storage.rs+++ b/crates/router_env/src/logger/storage.rs@@ -1,6 +1,4 @@-//!//! Storing [layer](https://docs.rs/tracing-subscriber/0.3.15/tracing_subscriber/layer/trait.Layer.html) for Router.-//!use std::{collections::HashMap, fmt, time::Instant};diff --git a/crates/router_env/src/logger/types.rs b/crates/router_env/src/logger/types.rsindex 5d59e7ddba..b1488b904b 100644--- a/crates/router_env/src/logger/types.rs+++ b/crates/router_env/src/logger/types.rs@@ -1,6 +1,4 @@-//!//! Types.-//!use serde::Deserialize;use strum::{Display, EnumString};@@ -9,12 +7,9 @@ pub use tracing::{Level, Value,};-////// Category and tag of log event.////// Don't hesitate to add your variant if it is missing here.-///-#[derive(Debug, Default, Deserialize, Clone, Display, EnumString)]pub enum Tag {/// General.@@ -516,9 +511,7 @@ pub enum Flow {PaymentStartRedirection,}-////// Trait for providing generic behaviour to flow metric-///pub trait FlowMetric: ToString + std::fmt::Debug + Clone {}impl FlowMetric for Flow {}diff --git a/crates/router_env/tests/logger.rs b/crates/router_env/tests/logger.rsindex 46b5b9538c..1070938a8a 100644--- a/crates/router_env/tests/logger.rs+++ b/crates/router_env/tests/logger.rs@@ -1,10 +1,11 @@#![allow(clippy::unwrap_used)]mod test_module;+use ::config::ConfigError;use router_env::TelemetryGuard;-use self::test_module::some_module::*;+use self::test_module::fn_with_colon;fn logger() -> error_stack::Result<&'static TelemetryGuard, ConfigError> {use once_cell::sync::OnceCell;diff --git a/crates/router_env/tests/test_module/some_module.rs b/crates/router_env/tests/test_module.rssimilarity index 90%rename from crates/router_env/tests/test_module/some_module.rsrename to crates/router_env/tests/test_module.rsindex 8c9dda2c08..f3c382706b 100644--- a/crates/router_env/tests/test_module/some_module.rs+++ b/crates/router_env/tests/test_module.rs@@ -1,7 +1,6 @@-use logger::instrument;use router_env as logger;-#[instrument(skip_all)]+#[tracing::instrument(skip_all)]pub async fn fn_with_colon(val: i32) {let a = 13;let b = 31;@@ -23,7 +22,7 @@ pub async fn fn_with_colon(val: i32) {fn_without_colon(131).await;}-#[instrument(fields(val3 = "abc"), skip_all)]+#[tracing::instrument(fields(val3 = "abc"), skip_all)]pub async fn fn_without_colon(val: i32) {let a = 13;let b = 31;diff --git a/crates/router_env/tests/test_module/mod.rs b/crates/router_env/tests/test_module/mod.rsdeleted file mode 100644index 7699174549..0000000000--- a/crates/router_env/tests/test_module/mod.rs+++ /dev/null@@ -1 +0,0 @@-pub mod some_module;diff --git a/crates/scheduler/src/db/mod.rs b/crates/scheduler/src/db.rssimilarity index 100%rename from crates/scheduler/src/db/mod.rsrename to crates/scheduler/src/db.rsdiff --git a/crates/storage_impl/src/mock_db.rs b/crates/storage_impl/src/mock_db.rsindex efcce56772..b81676a6cc 100644--- a/crates/storage_impl/src/mock_db.rs+++ b/crates/storage_impl/src/mock_db.rs@@ -1,6 +1,6 @@use std::sync::Arc;-use diesel_models::{self as store};+use diesel_models as store;use error_stack::ResultExt;use futures::lock::Mutex;use hyperswitch_domain_models::{diff --git a/crates/storage_impl/src/redis/cache.rs b/crates/storage_impl/src/redis/cache.rsindex 6993105795..b32c3d2204 100644--- a/crates/storage_impl/src/redis/cache.rs+++ b/crates/storage_impl/src/redis/cache.rs@@ -117,7 +117,7 @@ impl<'a> TryFrom<CacheRedact<'a>> for RedisValue {}}-impl<'a> TryFrom<RedisValue> for CacheRedact<'a> {+impl TryFrom<RedisValue> for CacheRedact<'_> {type Error = Report<errors::ValidationError>;fn try_from(v: RedisValue) -> Result<Self, Self::Error> {diff --git a/crates/storage_impl/src/redis/kv_store.rs b/crates/storage_impl/src/redis/kv_store.rsindex 2fde935b67..83d8de9c30 100644--- a/crates/storage_impl/src/redis/kv_store.rs+++ b/crates/storage_impl/src/redis/kv_store.rs@@ -57,7 +57,7 @@ pub enum PartitionKey<'a> {},}// PartitionKey::MerchantIdPaymentId {merchant_id, payment_id}-impl<'a> std::fmt::Display for PartitionKey<'a> {+impl std::fmt::Display for PartitionKey<'_> {fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {match *self {PartitionKey::MerchantIdPaymentId {@@ -279,7 +279,7 @@ pub enum Op<'a> {Find,}-impl<'a> std::fmt::Display for Op<'a> {+impl std::fmt::Display for Op<'_> {fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {match self {Op::Insert => f.write_str("insert"),