From ff795312014aab1cb1caa0e03cf8e68c5dd0f352 Mon Sep 17 00:00:00 2001 From: Illia Bobyr Date: Sat, 20 Apr 2024 18:13:15 -0700 Subject: [PATCH] cli::spend_utils: Remove `allow(clippy::arithmetic_side_effects)` (#937) --- cli/src/spend_utils.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cli/src/spend_utils.rs b/cli/src/spend_utils.rs index 2615ce3499d969..3868fb6160c5ed 100644 --- a/cli/src/spend_utils.rs +++ b/cli/src/spend_utils.rs @@ -1,5 +1,3 @@ -#![allow(clippy::arithmetic_side_effects)] - use { crate::{ checks::{check_account_for_balance_with_commitment, get_fee_for_messages}, @@ -118,7 +116,7 @@ where build_message, )?; if from_pubkey == fee_pubkey { - if from_balance == 0 || from_balance < spend + fee { + if from_balance == 0 || from_balance < spend.saturating_add(fee) { return Err(CliError::InsufficientFundsForSpendAndFee( lamports_to_sol(spend), lamports_to_sol(fee),