Skip to content

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

chore: address Rust 1.79 clippy lints (#5003)

Chethan Raoedf919e14273
diff --git a/crates/analytics/src/query.rs b/crates/analytics/src/query.rs
index 9a0d4ec62c..1ab79f07e4 100644
--- a/crates/analytics/src/query.rs
+++ b/crates/analytics/src/query.rs
@@ -317,6 +317,7 @@ impl std::fmt::Display for Order {
// "count",
// Order::Descending,
// )
+#[allow(dead_code)]
#[derive(Debug)]
pub struct TopN {
pub columns: String,
diff --git a/crates/router/src/connector/globalpay/response.rs b/crates/router/src/connector/globalpay/response.rs
index 7d5efadaff..95f8c33728 100644
--- a/crates/router/src/connector/globalpay/response.rs
+++ b/crates/router/src/connector/globalpay/response.rs
@@ -377,31 +377,11 @@ pub enum GlobalpayPaymentStatus {
Reversed,
}
-#[derive(Debug, Deserialize)]
-pub struct GlobalpayWebhoookResourceObject {
- pub data: GlobalpayWebhookDataResource,
-}
-
-#[derive(Debug, Deserialize)]
-pub struct GlobalpayWebhookDataResource {
- pub object: serde_json::Value,
-}
-
#[derive(Debug, Deserialize)]
pub struct GlobalpayWebhookObjectId {
pub id: String,
}
-#[derive(Debug, Deserialize)]
-pub struct GlobalpayWebhookDataId {
- pub object: GlobalpayWebhookObjectDataId,
-}
-
-#[derive(Debug, Deserialize)]
-pub struct GlobalpayWebhookObjectDataId {
- pub id: String,
-}
-
#[derive(Debug, Deserialize)]
pub struct GlobalpayWebhookObjectEventType {
pub status: GlobalpayWebhookStatus,
diff --git a/crates/router/tests/connectors/adyen.rs b/crates/router/tests/connectors/adyen.rs
index ff703dd84e..9ec7e1bd38 100644
--- a/crates/router/tests/connectors/adyen.rs
+++ b/crates/router/tests/connectors/adyen.rs
@@ -83,7 +83,6 @@ impl AdyenTest {
use common_utils::pii::Email;
Some(PaymentInfo {
- country: Some(api_models::enums::CountryAlpha2::NL),
currency: Some(enums::Currency::EUR),
address: Some(PaymentAddress::new(
None,
diff --git a/crates/router/tests/connectors/payme.rs b/crates/router/tests/connectors/payme.rs
index 6554ddbefb..045d356066 100644
--- a/crates/router/tests/connectors/payme.rs
+++ b/crates/router/tests/connectors/payme.rs
@@ -68,7 +68,6 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
return_url: None,
connector_customer: None,
payment_method_token: None,
- country: None,
currency: None,
#[cfg(feature = "payouts")]
payout_method_data: None,
diff --git a/crates/router/tests/connectors/square.rs b/crates/router/tests/connectors/square.rs
index 2dcd93cc10..db7dd933e8 100644
--- a/crates/router/tests/connectors/square.rs
+++ b/crates/router/tests/connectors/square.rs
@@ -48,7 +48,6 @@ fn get_default_payment_info(payment_method_token: Option<String>) -> Option<util
#[cfg(feature = "payouts")]
payout_method_data: None,
currency: None,
- country: None,
})
}
diff --git a/crates/router/tests/connectors/stax.rs b/crates/router/tests/connectors/stax.rs
index 421ad9524c..e1c139e941 100644
--- a/crates/router/tests/connectors/stax.rs
+++ b/crates/router/tests/connectors/stax.rs
@@ -51,7 +51,6 @@ fn get_default_payment_info(
#[cfg(feature = "payouts")]
payout_method_data: None,
currency: None,
- country: None,
})
}
diff --git a/crates/router/tests/connectors/utils.rs b/crates/router/tests/connectors/utils.rs
index 596b3ed606..d98f0dae4a 100644
--- a/crates/router/tests/connectors/utils.rs
+++ b/crates/router/tests/connectors/utils.rs
@@ -51,7 +51,6 @@ pub struct PaymentInfo {
#[cfg(feature = "payouts")]
pub payout_method_data: Option<types::api::PayoutMethodData>,
pub currency: Option<enums::Currency>,
- pub country: Option<enums::CountryAlpha2>,
}
impl PaymentInfo {
diff --git a/crates/router/tests/connectors/wise.rs b/crates/router/tests/connectors/wise.rs
index 161fd27f03..47b799324a 100644
--- a/crates/router/tests/connectors/wise.rs
+++ b/crates/router/tests/connectors/wise.rs
@@ -52,7 +52,6 @@ impl utils::Connector for WiseTest {
impl WiseTest {
fn get_payout_info() -> Option<PaymentInfo> {
Some(PaymentInfo {
- country: Some(api_models::enums::CountryAlpha2::NL),
currency: Some(enums::Currency::GBP),
address: Some(PaymentAddress::new(
None,