diff --git a/account-decoder/src/lib.rs b/account-decoder/src/lib.rs index 1771dccb9d..d3222128a9 100644 --- a/account-decoder/src/lib.rs +++ b/account-decoder/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate lazy_static; #[macro_use] diff --git a/accounts-bench/src/main.rs b/accounts-bench/src/main.rs index a8305b4ab8..1b5169e860 100644 --- a/accounts-bench/src/main.rs +++ b/accounts-bench/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate log; use clap::{crate_description, crate_name, value_t, App, Arg}; diff --git a/banking-bench/src/main.rs b/banking-bench/src/main.rs index 7bdf2b7275..0b06715121 100644 --- a/banking-bench/src/main.rs +++ b/banking-bench/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{crate_description, crate_name, value_t, App, Arg}; use crossbeam_channel::unbounded; use log::*; diff --git a/banks-server/src/lib.rs b/banks-server/src/lib.rs index 09b7067a50..f1c74a08ea 100644 --- a/banks-server/src/lib.rs +++ b/banks-server/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod banks_server; pub mod rpc_banks_service; pub mod send_transaction_service; diff --git a/bench-exchange/src/bench.rs b/bench-exchange/src/bench.rs index d2a064487d..f975d1602f 100644 --- a/bench-exchange/src/bench.rs +++ b/bench-exchange/src/bench.rs @@ -1,4 +1,5 @@ #![allow(clippy::useless_attribute)] +#![allow(clippy::integer_arithmetic)] use crate::order_book::*; use itertools::izip; diff --git a/bench-exchange/src/main.rs b/bench-exchange/src/main.rs index 1833fa00ad..1ae55adf6c 100644 --- a/bench-exchange/src/main.rs +++ b/bench-exchange/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod bench; mod cli; pub mod order_book; diff --git a/bench-streamer/src/main.rs b/bench-streamer/src/main.rs index 4ab14153a5..5763aa15e6 100644 --- a/bench-streamer/src/main.rs +++ b/bench-streamer/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{crate_description, crate_name, App, Arg}; use solana_streamer::packet::{Packet, Packets, PacketsRecycler, PACKET_DATA_SIZE}; use solana_streamer::streamer::{receiver, PacketReceiver}; diff --git a/bench-tps/src/lib.rs b/bench-tps/src/lib.rs index 1fb5342317..48f769a29a 100644 --- a/bench-tps/src/lib.rs +++ b/bench-tps/src/lib.rs @@ -1,2 +1,3 @@ +#![allow(clippy::integer_arithmetic)] pub mod bench; pub mod cli; diff --git a/bench-tps/src/main.rs b/bench-tps/src/main.rs index 20a80e7ff7..17ee213d76 100644 --- a/bench-tps/src/main.rs +++ b/bench-tps/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use log::*; use solana_bench_tps::bench::{do_bench_tps, generate_and_fund_keypairs, generate_keypairs}; use solana_bench_tps::cli; diff --git a/bench-tps/tests/bench_tps.rs b/bench-tps/tests/bench_tps.rs index a97cb29016..f0713623e1 100644 --- a/bench-tps/tests/bench_tps.rs +++ b/bench-tps/tests/bench_tps.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use serial_test_derive::serial; use solana_bench_tps::bench::{do_bench_tps, generate_and_fund_keypairs}; use solana_bench_tps::cli::Config; diff --git a/ci/test-checks.sh b/ci/test-checks.sh index 5662faaefc..90246448f7 100755 --- a/ci/test-checks.sh +++ b/ci/test-checks.sh @@ -56,7 +56,7 @@ _ "$cargo" stable fmt --all -- --check # -Z... is needed because of clippy bug: https://github.com/rust-lang/rust-clippy/issues/4612 # run nightly clippy for `sdk/` as there's a moderate amount of nightly-only code there -_ "$cargo" nightly clippy -Zunstable-options --workspace --all-targets -- --deny=warnings +_ "$cargo" nightly clippy -Zunstable-options --workspace --all-targets -- --deny=warnings --deny=clippy::integer_arithmetic cargo_audit_ignores=( # failure is officially deprecated/unmaintained diff --git a/cli-config/src/lib.rs b/cli-config/src/lib.rs index 435e9762c3..32ad0f38f9 100644 --- a/cli-config/src/lib.rs +++ b/cli-config/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate lazy_static; diff --git a/cli-output/src/lib.rs b/cli-output/src/lib.rs index ba72bd30d4..9339ba8106 100644 --- a/cli-output/src/lib.rs +++ b/cli-output/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] mod cli_output; pub mod display; pub use cli_output::*; diff --git a/cli/src/lib.rs b/cli/src/lib.rs index eb4baa2f02..ed480e334d 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] macro_rules! ACCOUNT_STRING { () => { r#", one of: diff --git a/client/src/lib.rs b/client/src/lib.rs index 70b1d60195..119c46c134 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate serde_derive; diff --git a/core/benches/banking_stage.rs b/core/benches/banking_stage.rs index bfda8d0729..fe19388883 100644 --- a/core/benches/banking_stage.rs +++ b/core/benches/banking_stage.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #![feature(test)] extern crate test; diff --git a/core/benches/blockstore.rs b/core/benches/blockstore.rs index 99daf07695..48480f28a0 100644 --- a/core/benches/blockstore.rs +++ b/core/benches/blockstore.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #![feature(test)] extern crate solana_ledger; extern crate test; diff --git a/core/benches/shredder.rs b/core/benches/shredder.rs index d1c95b6d9c..18bd9a90f7 100644 --- a/core/benches/shredder.rs +++ b/core/benches/shredder.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #![feature(test)] extern crate test; diff --git a/core/src/lib.rs b/core/src/lib.rs index d023b7133b..822e7130b6 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] +#![allow(clippy::integer_arithmetic)] //! The `solana` library implements the Solana high-performance blockchain architecture. //! It includes a full Rust implementation of the architecture (see //! [Validator](server/struct.Validator.html)) as well as hooks to GPU implementations of its most diff --git a/core/tests/cluster_info.rs b/core/tests/cluster_info.rs index fcd40e6fbc..97684b3e19 100644 --- a/core/tests/cluster_info.rs +++ b/core/tests/cluster_info.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use rayon::iter::ParallelIterator; use rayon::prelude::*; use serial_test_derive::serial; diff --git a/core/tests/crds_gossip.rs b/core/tests/crds_gossip.rs index 6577982f41..938eb7f1d3 100644 --- a/core/tests/crds_gossip.rs +++ b/core/tests/crds_gossip.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use bincode::serialized_size; use log::*; use rayon::prelude::*; diff --git a/core/tests/fork-selection.rs b/core/tests/fork-selection.rs index 8cf3d8b20d..23396a10d9 100644 --- a/core/tests/fork-selection.rs +++ b/core/tests/fork-selection.rs @@ -71,6 +71,7 @@ //! ``` //! time: 4007, tip converged: 10, trunk id: 3830, trunk time: 3827, trunk converged 100, trunk height 348 //! ``` +#![allow(clippy::integer_arithmetic)] extern crate rand; use rand::{thread_rng, Rng}; diff --git a/core/tests/gossip.rs b/core/tests/gossip.rs index 66e0c444d9..d06d1a61c1 100644 --- a/core/tests/gossip.rs +++ b/core/tests/gossip.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate log; diff --git a/core/tests/ledger_cleanup.rs b/core/tests/ledger_cleanup.rs index c0977e2515..d741889b3a 100644 --- a/core/tests/ledger_cleanup.rs +++ b/core/tests/ledger_cleanup.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] // Long-running ledger_cleanup tests #[cfg(test)] diff --git a/core/tests/snapshots.rs b/core/tests/snapshots.rs index 563348c413..ed091d0c4d 100644 --- a/core/tests/snapshots.rs +++ b/core/tests/snapshots.rs @@ -1,4 +1,5 @@ // Long-running bank_forks tests +#![allow(clippy::integer_arithmetic)] macro_rules! DEFINE_SNAPSHOT_VERSION_PARAMETERIZED_TEST_FUNCTIONS { ($x:ident, $y:ident, $z:ident) => { diff --git a/dos/src/main.rs b/dos/src/main.rs index 4d32273bc4..e2efce12d9 100644 --- a/dos/src/main.rs +++ b/dos/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{crate_description, crate_name, value_t, value_t_or_exit, App, Arg}; use log::*; use rand::{thread_rng, Rng}; diff --git a/download-utils/src/lib.rs b/download-utils/src/lib.rs index b19ec5ef8e..c7645af29c 100644 --- a/download-utils/src/lib.rs +++ b/download-utils/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use console::Emoji; use indicatif::{ProgressBar, ProgressStyle}; use log::*; diff --git a/frozen-abi/macro/src/lib.rs b/frozen-abi/macro/src/lib.rs index be7d5da96c..2298bc30fb 100644 --- a/frozen-abi/macro/src/lib.rs +++ b/frozen-abi/macro/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] extern crate proc_macro; #[cfg(RUSTC_WITH_SPECIALIZATION)] diff --git a/frozen-abi/src/lib.rs b/frozen-abi/src/lib.rs index 4641f74ca0..02ecdf7b27 100644 --- a/frozen-abi/src/lib.rs +++ b/frozen-abi/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] #![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))] +#![allow(clippy::integer_arithmetic)] // Allows macro expansion of `use ::solana_frozen_abi::*` to work within this crate extern crate self as solana_frozen_abi; diff --git a/genesis/src/lib.rs b/genesis/src/lib.rs index 19eab13672..33a0e90e4c 100644 --- a/genesis/src/lib.rs +++ b/genesis/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod address_generator; pub mod genesis_accounts; pub mod stakes; diff --git a/genesis/src/main.rs b/genesis/src/main.rs index ee129c5384..db148434d4 100644 --- a/genesis/src/main.rs +++ b/genesis/src/main.rs @@ -1,4 +1,5 @@ //! A command-line executable for generating the chain's genesis config. +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate solana_budget_program; diff --git a/install/src/lib.rs b/install/src/lib.rs index f534e53957..a8bcd66c40 100644 --- a/install/src/lib.rs +++ b/install/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate lazy_static; diff --git a/keygen/src/keygen.rs b/keygen/src/keygen.rs index 06e6c42c61..4d7a9f5ec4 100644 --- a/keygen/src/keygen.rs +++ b/keygen/src/keygen.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use bip39::{Language, Mnemonic, MnemonicType, Seed}; use clap::{ crate_description, crate_name, value_t, values_t_or_exit, App, AppSettings, Arg, ArgMatches, diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 41a7f7b4ea..8a917ab2ee 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{ crate_description, crate_name, value_t, value_t_or_exit, values_t_or_exit, App, Arg, ArgMatches, SubCommand, diff --git a/ledger/benches/protobuf.rs b/ledger/benches/protobuf.rs index 27d7b6bb1d..6b511b2925 100644 --- a/ledger/benches/protobuf.rs +++ b/ledger/benches/protobuf.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #![feature(test)] extern crate test; diff --git a/ledger/src/lib.rs b/ledger/src/lib.rs index 7a55e4d4cd..603f585da3 100644 --- a/ledger/src/lib.rs +++ b/ledger/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate solana_bpf_loader_program; diff --git a/ledger/tests/shred.rs b/ledger/tests/shred.rs index 23fc4559d8..80a720da12 100644 --- a/ledger/tests/shred.rs +++ b/ledger/tests/shred.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use solana_ledger::entry::Entry; use solana_ledger::shred::{ max_entries_per_n_shred, verify_test_data_shred, Shred, Shredder, diff --git a/local-cluster/src/lib.rs b/local-cluster/src/lib.rs index c84926f844..133b4fc168 100644 --- a/local-cluster/src/lib.rs +++ b/local-cluster/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod cluster; pub mod cluster_tests; pub mod local_cluster; diff --git a/local-cluster/tests/local_cluster.rs b/local-cluster/tests/local_cluster.rs index 1c249a1840..abc16bdbbb 100644 --- a/local-cluster/tests/local_cluster.rs +++ b/local-cluster/tests/local_cluster.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use assert_matches::assert_matches; use crossbeam_channel::{unbounded, Receiver}; use gag::BufferRedirect; diff --git a/log-analyzer/src/main.rs b/log-analyzer/src/main.rs index 11b3542d47..8d0852b02a 100644 --- a/log-analyzer/src/main.rs +++ b/log-analyzer/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] extern crate byte_unit; use byte_unit::Byte; diff --git a/measure/src/lib.rs b/measure/src/lib.rs index b2388e64b1..d880ddc9fc 100644 --- a/measure/src/lib.rs +++ b/measure/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod measure; pub mod thread_mem_usage; diff --git a/merkle-tree/src/lib.rs b/merkle-tree/src/lib.rs index 8f4a18382c..f68e4b7ef4 100644 --- a/merkle-tree/src/lib.rs +++ b/merkle-tree/src/lib.rs @@ -1,2 +1,3 @@ +#![allow(clippy::integer_arithmetic)] pub mod merkle_tree; pub use merkle_tree::MerkleTree; diff --git a/metrics/src/lib.rs b/metrics/src/lib.rs index 622cef3db3..d0ca7264ce 100644 --- a/metrics/src/lib.rs +++ b/metrics/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod counter; pub mod datapoint; mod metrics; diff --git a/net-shaper/src/main.rs b/net-shaper/src/main.rs index 7aee97c9ba..ba45148f01 100644 --- a/net-shaper/src/main.rs +++ b/net-shaper/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{ crate_description, crate_name, crate_version, value_t, value_t_or_exit, App, Arg, ArgMatches, SubCommand, diff --git a/net-utils/src/lib.rs b/net-utils/src/lib.rs index 141852108c..99619c21d2 100644 --- a/net-utils/src/lib.rs +++ b/net-utils/src/lib.rs @@ -1,4 +1,5 @@ //! The `net_utils` module assists with networking +#![allow(clippy::integer_arithmetic)] use { log::*, rand::{thread_rng, Rng}, diff --git a/perf/src/lib.rs b/perf/src/lib.rs index 82feefaa70..9559e052e4 100644 --- a/perf/src/lib.rs +++ b/perf/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod cuda_runtime; pub mod packet; pub mod perf_libs; diff --git a/poh-bench/src/main.rs b/poh-bench/src/main.rs index 9e4662ab61..03228cf90c 100644 --- a/poh-bench/src/main.rs +++ b/poh-bench/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{crate_description, crate_name, value_t, App, Arg}; use solana_ledger::entry::{self, create_ticks, init_poh, EntrySlice, VerifyRecyclers}; use solana_measure::measure::Measure; diff --git a/program-test/src/lib.rs b/program-test/src/lib.rs index 8501ea7ce8..89440450b1 100644 --- a/program-test/src/lib.rs +++ b/program-test/src/lib.rs @@ -1,4 +1,5 @@ //! The solana-program-test provides a BanksClient-based test framework BPF programs +#![allow(clippy::integer_arithmetic)] use { async_trait::async_trait, diff --git a/program-test/tests/warp.rs b/program-test/tests/warp.rs index 565c11c350..c2ac681115 100644 --- a/program-test/tests/warp.rs +++ b/program-test/tests/warp.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use { solana_program::{ account_info::{next_account_info, AccountInfo}, diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs index 5325077b5c..9eae2fe3e9 100644 --- a/programs/bpf_loader/src/lib.rs +++ b/programs/bpf_loader/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod alloc; pub mod allocator_bump; pub mod bpf_verifier; diff --git a/programs/budget/src/lib.rs b/programs/budget/src/lib.rs index 3784c20218..ba182ef79d 100644 --- a/programs/budget/src/lib.rs +++ b/programs/budget/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod budget_expr; pub mod budget_instruction; pub mod budget_processor; diff --git a/programs/config/src/lib.rs b/programs/config/src/lib.rs index dced35d309..4521dfbf17 100644 --- a/programs/config/src/lib.rs +++ b/programs/config/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod config_instruction; pub mod config_processor; pub mod date_instruction; diff --git a/programs/exchange/src/lib.rs b/programs/exchange/src/lib.rs index 956d23990a..21a0cb3569 100644 --- a/programs/exchange/src/lib.rs +++ b/programs/exchange/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod exchange_instruction; pub mod exchange_processor; pub mod exchange_state; diff --git a/programs/stake/src/lib.rs b/programs/stake/src/lib.rs index 57c4616bc4..23438bf8c8 100644 --- a/programs/stake/src/lib.rs +++ b/programs/stake/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] +#![allow(clippy::integer_arithmetic)] use solana_sdk::genesis_config::GenesisConfig; pub mod config; diff --git a/programs/vest/src/lib.rs b/programs/vest/src/lib.rs index 8005e7081a..415ef3d418 100644 --- a/programs/vest/src/lib.rs +++ b/programs/vest/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod vest_instruction; pub mod vest_processor; pub mod vest_schedule; diff --git a/programs/vote/src/lib.rs b/programs/vote/src/lib.rs index 9e6daccb55..57e55b52dd 100644 --- a/programs/vote/src/lib.rs +++ b/programs/vote/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] +#![allow(clippy::integer_arithmetic)] pub mod authorized_voters; pub mod vote_instruction; diff --git a/ramp-tps/src/main.rs b/ramp-tps/src/main.rs index 0735dcb51c..5cdbf860b1 100644 --- a/ramp-tps/src/main.rs +++ b/ramp-tps/src/main.rs @@ -1,4 +1,5 @@ //! Ramp up TPS for Tour de SOL until all validators drop out +#![allow(clippy::integer_arithmetic)] mod results; mod stake; diff --git a/remote-wallet/src/lib.rs b/remote-wallet/src/lib.rs index a9308ff958..ee2e2232a0 100644 --- a/remote-wallet/src/lib.rs +++ b/remote-wallet/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod ledger; pub mod ledger_error; pub mod remote_keypair; diff --git a/runtime/benches/accounts.rs b/runtime/benches/accounts.rs index 1c3b1d30a5..509120ebd1 100644 --- a/runtime/benches/accounts.rs +++ b/runtime/benches/accounts.rs @@ -1,4 +1,5 @@ #![feature(test)] +#![allow(clippy::integer_arithmetic)] extern crate test; diff --git a/runtime/benches/bank.rs b/runtime/benches/bank.rs index 865dc2f45f..ba196fbfe6 100644 --- a/runtime/benches/bank.rs +++ b/runtime/benches/bank.rs @@ -1,4 +1,5 @@ #![feature(test)] +#![allow(clippy::integer_arithmetic)] extern crate test; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index aa31d3b851..4846c48e17 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] +#![allow(clippy::integer_arithmetic)] pub mod accounts; pub mod accounts_background_service; pub mod accounts_cache; diff --git a/runtime/tests/stake.rs b/runtime/tests/stake.rs index 9f15428ef8..0c22c484e2 100644 --- a/runtime/tests/stake.rs +++ b/runtime/tests/stake.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use solana_runtime::{ bank::Bank, bank_client::BankClient, diff --git a/sdk/program/src/lib.rs b/sdk/program/src/lib.rs index a99075f98d..44eab1cad6 100644 --- a/sdk/program/src/lib.rs +++ b/sdk/program/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] #![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))] +#![allow(clippy::integer_arithmetic)] // Allows macro expansion of `use ::solana_program::*` to work within this crate extern crate self as solana_program; diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index f0b6db4af8..8bfcddb66a 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] #![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))] +#![allow(clippy::integer_arithmetic)] // Allows macro expansion of `use ::solana_sdk::*` to work within this crate extern crate self as solana_sdk; diff --git a/stake-accounts/src/main.rs b/stake-accounts/src/main.rs index 5b71c99ac0..37a4da0cb8 100644 --- a/stake-accounts/src/main.rs +++ b/stake-accounts/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] mod arg_parser; mod args; mod stake_accounts; diff --git a/stake-monitor/src/lib.rs b/stake-monitor/src/lib.rs index 387ad15698..150621754e 100644 --- a/stake-monitor/src/lib.rs +++ b/stake-monitor/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use log::*; use serde::{Deserialize, Serialize}; use solana_client::{client_error::Result as ClientResult, rpc_client::RpcClient}; diff --git a/stake-o-matic/src/main.rs b/stake-o-matic/src/main.rs index f7955af164..bf8db8b8bb 100644 --- a/stake-o-matic/src/main.rs +++ b/stake-o-matic/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{crate_description, crate_name, crate_version, value_t, value_t_or_exit, App, Arg}; use log::*; use solana_clap_utils::{ diff --git a/storage-bigtable/src/lib.rs b/storage-bigtable/src/lib.rs index 8ddae05f36..895e057db4 100644 --- a/storage-bigtable/src/lib.rs +++ b/storage-bigtable/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use log::*; use serde::{Deserialize, Serialize}; use solana_sdk::{ diff --git a/streamer/src/lib.rs b/streamer/src/lib.rs index f2c74d9efb..e0b9bd7176 100644 --- a/streamer/src/lib.rs +++ b/streamer/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod packet; pub mod recvmmsg; pub mod sendmmsg; diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index a864f200e7..8df0d4f482 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub mod arg_parser; pub mod args; pub mod commands; diff --git a/transaction-status/src/lib.rs b/transaction-status/src/lib.rs index 83d94f0e84..10f7d0570a 100644 --- a/transaction-status/src/lib.rs +++ b/transaction-status/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] #[macro_use] extern crate lazy_static; #[macro_use] diff --git a/validator/src/bin/solana-test-validator.rs b/validator/src/bin/solana-test-validator.rs index d35c284f7f..7982c97732 100644 --- a/validator/src/bin/solana-test-validator.rs +++ b/validator/src/bin/solana-test-validator.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use { clap::{value_t, value_t_or_exit, App, Arg}, console::style, diff --git a/validator/src/lib.rs b/validator/src/lib.rs index e9793281e4..87450dd01d 100644 --- a/validator/src/lib.rs +++ b/validator/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] pub use solana_core::test_validator; use { log::*, diff --git a/validator/src/main.rs b/validator/src/main.rs index 7b7b9b4b14..b8d21ce326 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1,3 +1,4 @@ +#![allow(clippy::integer_arithmetic)] use clap::{ crate_description, crate_name, value_t, value_t_or_exit, values_t, values_t_or_exit, App, AppSettings, Arg, ArgMatches, SubCommand, diff --git a/watchtower/src/main.rs b/watchtower/src/main.rs index 802098d311..d16faebca2 100644 --- a/watchtower/src/main.rs +++ b/watchtower/src/main.rs @@ -1,4 +1,5 @@ //! A command-line executable for monitoring the health of a cluster +#![allow(clippy::integer_arithmetic)] use { clap::{crate_description, crate_name, value_t, value_t_or_exit, App, Arg},