Skip to content

Commit

Permalink
cli::validator_info: Remove allow(clippy::arithmetic_side_effects) (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-bobyr authored Apr 19, 2024
1 parent deec1f4 commit 201a739
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/src/validator_info.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::arithmetic_side_effects)]

use {
crate::{
cli::{CliCommand, CliCommandInfo, CliConfig, CliError, ProcessResult},
Expand Down Expand Up @@ -336,7 +334,9 @@ pub fn process_set_validator_info(
(validator_info::id(), false),
(config.signers[0].pubkey(), true),
];
let data_len = ValidatorInfo::max_space() + ConfigKeys::serialized_size(keys.clone());
let data_len = ValidatorInfo::max_space()
.checked_add(ConfigKeys::serialized_size(keys.clone()))
.expect("ValidatorInfo and two keys fit into a u64");
let lamports = rpc_client.get_minimum_balance_for_rent_exemption(data_len as usize)?;

let signers = if balance == 0 {
Expand Down

0 comments on commit 201a739

Please sign in to comment.