Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hrithikesh026 committed Nov 21, 2023
1 parent 5abda8d commit 54fbbb1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>
)
.await?;


let payment_data = PaymentData {
flow: PhantomData,
payment_intent,
Expand Down Expand Up @@ -461,7 +460,7 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>
ephemeral_key: None,
multiple_capture_data: None,
redirect_response: None,
surcharge_details:None,
surcharge_details: None,
frm_message: None,
payment_link_data: None,
};
Expand Down
10 changes: 0 additions & 10 deletions crates/router/src/types/storage/payment_attempt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ impl PaymentAttemptExt for PaymentAttempt {
let next_sequence_number = self.multiple_capture_count.unwrap_or_default() + 1;
format!("{}_{}", self.attempt_id.clone(), next_sequence_number)
}

fn get_intent_status(&self, amount_captured: Option<i64>) -> enums::IntentStatus {
let intent_status = enums::IntentStatus::foreign_from(self.status);
if intent_status == enums::IntentStatus::Cancelled && amount_captured > Some(0) {
enums::IntentStatus::Succeeded
} else {
intent_status
}
}
fn get_surcharge_details(&self) -> Option<api_models::payments::RequestSurchargeDetails> {
self.surcharge_amount.map(|surcharge_amount| {
api_models::payments::RequestSurchargeDetails {
Expand All @@ -76,7 +67,6 @@ impl PaymentAttemptExt for PaymentAttempt {
}
})
}

fn get_total_amount(&self) -> i64 {
self.amount + self.surcharge_amount.unwrap_or(0) + self.tax_amount.unwrap_or(0)
}
Expand Down

0 comments on commit 54fbbb1

Please sign in to comment.