Skip to content

Commit

Permalink
Use saturating_sub in budget_remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Sep 16, 2023
1 parent ee73c38 commit 3df50d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mutiny-core/src/nostr/nwc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl BudgetedSpendingConditions {

pub fn budget_remaining(&self) -> u64 {
let mut clone = self.clone();
self.budget - clone.sum_payments()
self.budget.saturating_sub(clone.sum_payments())
}
}

Expand Down

0 comments on commit 3df50d4

Please sign in to comment.