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: resolve v2 warnings in common_utils (#7358)
Aishwariyaa Anand338a95372c84
diff --git a/crates/common_utils/src/id_type/global_id.rs b/crates/common_utils/src/id_type/global_id.rsindex 1e376dfe4d..bb296d7ef1 100644--- a/crates/common_utils/src/id_type/global_id.rs+++ b/crates/common_utils/src/id_type/global_id.rs@@ -134,7 +134,7 @@ impl GlobalId {) -> Result<Self, GlobalIdError> {let length_id = LengthId::from(input_string)?;let input_string = &length_id.0 .0;- let (cell_id, remaining) = input_string+ let (cell_id, _remaining) = input_string.split_once("_").ok_or(GlobalIdError::InvalidIdFormat)?;diff --git a/crates/common_utils/src/id_type/global_id/customer.rs b/crates/common_utils/src/id_type/global_id/customer.rsindex e0de91d8ae..014d56c9aa 100644--- a/crates/common_utils/src/id_type/global_id/customer.rs+++ b/crates/common_utils/src/id_type/global_id/customer.rs@@ -1,6 +1,4 @@-use error_stack::ResultExt;--use crate::{errors, generate_id_with_default_len, generate_time_ordered_id_without_prefix, types};+use crate::errors;crate::global_id_type!(GlobalCustomerId,@@ -29,7 +27,7 @@ impl GlobalCustomerId {}impl TryFrom<GlobalCustomerId> for crate::id_type::CustomerId {- type Error = error_stack::Report<crate::errors::ValidationError>;+ type Error = error_stack::Report<errors::ValidationError>;fn try_from(value: GlobalCustomerId) -> Result<Self, Self::Error> {Self::try_from(std::borrow::Cow::from(value.get_string_repr().to_owned()))diff --git a/crates/common_utils/src/id_type/global_id/payment.rs b/crates/common_utils/src/id_type/global_id/payment.rsindex e43e33c619..94ffbed57a 100644--- a/crates/common_utils/src/id_type/global_id/payment.rs+++ b/crates/common_utils/src/id_type/global_id/payment.rs@@ -1,7 +1,7 @@use common_enums::enums;use error_stack::ResultExt;-use crate::{errors, generate_id_with_default_len, generate_time_ordered_id_without_prefix, types};+use crate::errors;crate::global_id_type!(GlobalPaymentId,@@ -42,7 +42,6 @@ impl GlobalPaymentId {impl TryFrom<std::borrow::Cow<'static, str>> for GlobalPaymentId {type Error = error_stack::Report<errors::ValidationError>;fn try_from(value: std::borrow::Cow<'static, str>) -> Result<Self, Self::Error> {- use error_stack::ResultExt;let merchant_ref_id = super::GlobalId::from_string(value).change_context(errors::ValidationError::IncorrectValueProvided {field_name: "payment_id",@@ -86,7 +85,6 @@ impl GlobalAttemptId {impl TryFrom<std::borrow::Cow<'static, str>> for GlobalAttemptId {type Error = error_stack::Report<errors::ValidationError>;fn try_from(value: std::borrow::Cow<'static, str>) -> Result<Self, Self::Error> {- use error_stack::ResultExt;let global_attempt_id = super::GlobalId::from_string(value).change_context(errors::ValidationError::IncorrectValueProvided {field_name: "payment_id",diff --git a/crates/common_utils/src/id_type/global_id/refunds.rs b/crates/common_utils/src/id_type/global_id/refunds.rsindex 0aac9bf580..eb8dad6b3a 100644--- a/crates/common_utils/src/id_type/global_id/refunds.rs+++ b/crates/common_utils/src/id_type/global_id/refunds.rs@@ -1,6 +1,6 @@use error_stack::ResultExt;-use crate::{errors, generate_id_with_default_len, generate_time_ordered_id_without_prefix, types};+use crate::errors;/// A global id that can be used to identify a refund#[derive(@@ -36,7 +36,6 @@ impl GlobalRefundId {impl TryFrom<std::borrow::Cow<'static, str>> for GlobalRefundId {type Error = error_stack::Report<errors::ValidationError>;fn try_from(value: std::borrow::Cow<'static, str>) -> Result<Self, Self::Error> {- use error_stack::ResultExt;let merchant_ref_id = super::GlobalId::from_string(value).change_context(errors::ValidationError::IncorrectValueProvided {field_name: "refund_id",