cli: Move `allow(clippy::arithmetic_side_effects)` into modules (#758)

The rest of the codebase has `clippy::arithmetic_side_effects` enabled.
While CLI is not as critical as the rest of the validator code base, it
seems nice to be precise about the arithmetic operations, and clippy
helps with that if `arithmetic_side_effects` is enabled.

A blanket disable at the module level is suboptimal.  As we have a lot
of operations already written, that generate warnings under
`arithmetic_side_effects`, the first step is to move the lint control
into individual modules, that we can then inspect one by one.
This commit is contained in:
Illia Bobyr 2024-04-11 22:01:53 -07:00 committed by GitHub
parent c4996d6e52
commit dabcc39819
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::cli::CliError,
solana_rpc_client::rpc_client::RpcClient,

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
cli::{CliCommand, CliCommandInfo, CliConfig, CliError, ProcessResult},

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
cli::{

View File

@ -1,4 +1,3 @@
#![allow(clippy::arithmetic_side_effects)]
macro_rules! ACCOUNT_STRING {
() => {
r#" Address is one of:

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
checks::*,

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
checks::*,

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
checks::{check_account_for_balance_with_commitment, get_fee_for_messages},

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
checks::{check_account_for_fee_with_commitment, check_unique_pubkeys},

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
solana_rpc_client::rpc_client::RpcClient,
solana_sdk::{

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
cli::{CliCommand, CliCommandInfo, CliConfig, CliError, ProcessResult},

View File

@ -1,3 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{
checks::{check_account_for_fee_with_commitment, check_unique_pubkeys},