Skip to content

Commit

Permalink
chore: run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 5, 2023
1 parent 370b81c commit 4574aea
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions crates/router/src/core/payments/operations/payment_response.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use std::collections::HashMap;

use async_trait::async_trait;
use data_models::payments::payment_attempt::PaymentAttempt;
use error_stack::ResultExt;
use futures::FutureExt;
use router_derive;
use router_env::{instrument, tracing};
use storage_impl::DataModelExt;
use tracing_futures::Instrument;

use super::{Operation, PostUpdateTracker};
Expand All @@ -29,8 +31,6 @@ use crate::{
},
utils,
};
use storage_impl::DataModelExt;
use data_models::payments::payment_attempt::PaymentAttempt;

#[derive(Debug, Clone, Copy, router_derive::PaymentOperation)]
#[operation(
Expand Down Expand Up @@ -592,8 +592,12 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
let m_payment_attempt_update = payment_attempt_update.clone();
let m_payment_attempt = payment_attempt.clone();

let payment_attempt = match payment_attempt_update{
Some(payment_attempt_update) => PaymentAttempt::from_storage_model(payment_attempt_update.to_storage_model().apply_changeset(payment_attempt.clone().to_storage_model())),
let payment_attempt = match payment_attempt_update {
Some(payment_attempt_update) => PaymentAttempt::from_storage_model(
payment_attempt_update
.to_storage_model()
.apply_changeset(payment_attempt.clone().to_storage_model()),
),
None => payment_attempt,
};

Expand Down Expand Up @@ -623,11 +627,13 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
let m_connector_response_update = connector_response_update.clone();
let m_connector_response = connector_response.clone();

let connector_response = match connector_response_update{
Some(connector_response_update) => connector_response_update.apply_changeset(connector_response.clone()),
let connector_response = match connector_response_update {
Some(connector_response_update) => {
connector_response_update.apply_changeset(connector_response.clone())
}
None => connector_response,
};

let connector_response_fut = tokio::spawn(
async move {
Box::pin(async move {
Expand Down

0 comments on commit 4574aea

Please sign in to comment.