Skip to content

Commit

Permalink
refactor: clippy and hack fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif-m committed Nov 7, 2024
1 parent 0bbd41f commit 63199f5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion crates/hyperswitch_connectors/src/default_implementations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ default_imp_for_file_upload!(
macro_rules! default_imp_for_payouts {
($($path:ident::$connector:ident),*) => {
$(
impl api::payouts::Payouts for $path::$connector {}
impl api::Payouts for $path::$connector {}
)*
};
}
Expand All @@ -1041,6 +1041,7 @@ default_imp_for_payouts!(
connectors::Forte,
connectors::Globepay,
connectors::Helcim,
connectors::Jpmorgan,
connectors::Mollie,
connectors::Multisafepay,
connectors::Nexinets,
Expand Down
6 changes: 6 additions & 0 deletions crates/hyperswitch_interfaces/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ use masking::Maskable;
use router_env::metrics::add_attributes;
use serde_json::json;

#[cfg(feature = "payouts")]
pub use self::payouts::*;
pub use self::{payments::*, refunds::*};
use crate::{
configs::Connectors, connector_integration_v2::ConnectorIntegrationV2, consts, errors,
Expand Down Expand Up @@ -410,3 +412,7 @@ pub trait ConnectorRedirectResponse {
Ok(CallConnectorAction::Avoid)
}
}

/// Empty trait for when payouts feature is disabled
#[cfg(not(feature = "payouts"))]
pub trait Payouts {}
5 changes: 0 additions & 5 deletions crates/hyperswitch_interfaces/src/api/payouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use hyperswitch_domain_models::router_flow_types::payouts::{
PoCancel, PoCreate, PoEligibility, PoFulfill, PoQuote, PoRecipient, PoRecipientAccount, PoSync,
};
#[cfg(feature = "payouts")]
use hyperswitch_domain_models::{
router_request_types::PayoutsData, router_response_types::PayoutsResponseData,
};
Expand Down Expand Up @@ -58,7 +57,3 @@ pub trait Payouts:
+ PayoutSync
{
}

/// Empty trait for when payouts feature is disabled
#[cfg(not(feature = "payouts"))]
pub trait Payouts {}
1 change: 0 additions & 1 deletion crates/router/src/core/payments/flows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,6 @@ default_imp_for_payouts!(
connector::Gpayments,
connector::Iatapay,
connector::Itaubank,
connector::Jpmorgan,
connector::Klarna,
connector::Mifinity,
connector::Netcetera,
Expand Down

0 comments on commit 63199f5

Please sign in to comment.