Skip to content

Commit

Permalink
Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Aug 29, 2023
1 parent 2854007 commit 017df02
Show file tree
Hide file tree
Showing 145 changed files with 149 additions and 149 deletions.
2 changes: 1 addition & 1 deletion account-decoder/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#[macro_use]
extern crate lazy_static;
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion accounts-bench/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

#[macro_use]
extern crate log;
Expand Down
2 changes: 1 addition & 1 deletion accounts-cluster-bench/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
clap::{crate_description, crate_name, value_t, values_t_or_exit, App, Arg},
log::*,
Expand Down
2 changes: 1 addition & 1 deletion accounts-db/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

#[macro_use]
extern crate lazy_static;
Expand Down
2 changes: 1 addition & 1 deletion banking-bench/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
clap::{crate_description, crate_name, Arg, ArgEnum, Command},
crossbeam_channel::{unbounded, Receiver},
Expand Down
2 changes: 1 addition & 1 deletion banks-server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod banks_server;
2 changes: 1 addition & 1 deletion bench-streamer/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

use {
clap::{crate_description, crate_name, Arg, Command},
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod bench;
pub mod bench_tps_client;
pub mod cli;
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
clap::value_t,
log::*,
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/tests/bench_tps.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

use {
serial_test::serial,
Expand Down
2 changes: 1 addition & 1 deletion bucket_map/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
mod bucket;
pub mod bucket_api;
mod bucket_item;
Expand Down
4 changes: 2 additions & 2 deletions ci/test-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ nightly_clippy_allows=(--allow=clippy::redundant_clone)
_ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" clippy --workspace --all-targets --features dummy-for-ci-check -- \
--deny=warnings \
--deny=clippy::default_trait_access \
--deny=clippy::integer_arithmetic \
--deny=clippy::arithmetic_side_effects \
--deny=clippy::manual_let_else \
--deny=clippy::used_underscore_binding \
"${nightly_clippy_allows[@]}"
Expand All @@ -87,7 +87,7 @@ _ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" clippy --workspace -
_ scripts/cargo-for-all-lock-files.sh -- clippy --workspace --tests --bins --examples --features dummy-for-ci-check -- \
--deny=warnings \
--deny=clippy::default_trait_access \
--deny=clippy::integer_arithmetic \
--deny=clippy::arithmetic_side_effects \
--deny=clippy::manual_let_else \
--deny=clippy::used_underscore_binding

Expand Down
2 changes: 1 addition & 1 deletion cli-output/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
mod cli_output;
pub mod cli_version;
pub mod display;
Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
macro_rules! ACCOUNT_STRING {
() => {
r#", one of:
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/nonce.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
solana_cli::{
check_balance,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/program.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

use {
serde_json::Value,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/request_airdrop.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
solana_cli::cli::{process_command, CliCommand, CliConfig},
solana_faucet::faucet::run_local_faucet,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/stake.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![allow(clippy::redundant_closure)]
use {
solana_cli::{
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/transfer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![allow(clippy::redundant_closure)]
use {
solana_cli::{
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/vote.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
solana_cli::{
check_balance,
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

pub mod connection_cache;
pub mod nonblocking;
Expand Down
2 changes: 1 addition & 1 deletion client/src/transaction_executor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
log::*,
solana_measure::measure::Measure,
Expand Down
2 changes: 1 addition & 1 deletion connection-cache/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

pub mod client_connection;
pub mod connection_cache;
Expand Down
2 changes: 1 addition & 1 deletion core/benches/banking_stage.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![feature(test)]

extern crate test;
Expand Down
2 changes: 1 addition & 1 deletion core/benches/consumer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![feature(test)]

use {
Expand Down
2 changes: 1 addition & 1 deletion core/benches/shredder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![feature(test)]

extern crate test;
Expand Down
2 changes: 1 addition & 1 deletion core/benches/sigverify_stage.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(test)]
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

extern crate solana_core;
extern crate test;
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![recursion_limit = "2048"]
//! The `solana` library implements the Solana high-performance blockchain architecture.
//! It includes a full Rust implementation of the architecture (see
Expand Down
2 changes: 1 addition & 1 deletion core/tests/epoch_accounts_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ fn test_epoch_accounts_hash_and_warping() {
// https://github.com/rust-lang/rust/pull/88582
// https://github.com/jhpratt/rust/blob/727a4fc7e3f836938dfeb4a2ab237cfca612222d/library/core/src/num/uint_macros.rs#L1811-L1837
const fn next_multiple_of(lhs: u64, rhs: u64) -> u64 {
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
match lhs % rhs {
0 => lhs,
r => lhs + (rhs - r),
Expand Down
2 changes: 1 addition & 1 deletion core/tests/fork-selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
//! ```
//! time: 4007, tip converged: 10, trunk id: 3830, trunk time: 3827, trunk converged 100, trunk height 348
//! ```
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

extern crate rand;
use {
Expand Down
2 changes: 1 addition & 1 deletion core/tests/ledger_cleanup.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
// Long-running ledger_cleanup tests

#[cfg(test)]
Expand Down
2 changes: 1 addition & 1 deletion core/tests/snapshots.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

use {
crate::snapshot_utils::create_tmp_accounts_dir_for_tests,
Expand Down
2 changes: 1 addition & 1 deletion cost-model/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

pub mod block_cost_limits;
pub mod cost_model;
Expand Down
2 changes: 1 addition & 1 deletion dos/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod cli;
2 changes: 1 addition & 1 deletion dos/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
//! solana-dos $COMMON --valid-blockhash --transaction-type account-creation
//! ```
//!
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
crossbeam_channel::{select, tick, unbounded, Receiver, Sender},
itertools::Itertools,
Expand Down
2 changes: 1 addition & 1 deletion download-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
console::Emoji,
indicatif::{ProgressBar, ProgressStyle},
Expand Down
2 changes: 1 addition & 1 deletion entry/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod entry;
pub mod poh;

Expand Down
2 changes: 1 addition & 1 deletion genesis/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod address_generator;
pub mod genesis_accounts;
pub mod stakes;
Expand Down
2 changes: 1 addition & 1 deletion genesis/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! A command-line executable for generating the chain's genesis config.
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

use {
base64::{prelude::BASE64_STANDARD, Engine},
Expand Down
2 changes: 1 addition & 1 deletion gossip/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

pub mod cluster_info;
pub mod cluster_info_metrics;
Expand Down
2 changes: 1 addition & 1 deletion gossip/tests/crds_gossip.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
bincode::serialized_size,
log::*,
Expand Down
2 changes: 1 addition & 1 deletion gossip/tests/gossip.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#[macro_use]
extern crate log;

Expand Down
2 changes: 1 addition & 1 deletion install/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#[macro_use]
extern crate lazy_static;

Expand Down
2 changes: 1 addition & 1 deletion keygen/src/keygen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
bip39::{Mnemonic, MnemonicType, Seed},
clap::{crate_description, crate_name, Arg, ArgMatches, Command},
Expand Down
2 changes: 1 addition & 1 deletion ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
crate::{args::*, bigtable::*, ledger_path::*, ledger_utils::*, output::*, program::*},
chrono::{DateTime, Utc},
Expand Down
2 changes: 1 addition & 1 deletion ledger/benches/blockstore.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![feature(test)]
extern crate solana_ledger;
extern crate test;
Expand Down
2 changes: 1 addition & 1 deletion ledger/benches/protobuf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![feature(test)]
extern crate test;

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

pub mod bank_forks_utils;
pub mod bigtable_delete;
Expand Down
2 changes: 1 addition & 1 deletion ledger/tests/shred.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
solana_entry::entry::Entry,
solana_ledger::shred::{
Expand Down
2 changes: 1 addition & 1 deletion local-cluster/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod cluster;
pub mod cluster_tests;
pub mod integration_tests;
Expand Down
2 changes: 1 addition & 1 deletion local-cluster/tests/local_cluster.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
assert_matches::assert_matches,
crossbeam_channel::{unbounded, Receiver},
Expand Down
2 changes: 1 addition & 1 deletion log-analyzer/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
extern crate byte_unit;

use {
Expand Down
2 changes: 1 addition & 1 deletion measure/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod macros;
pub mod measure;
2 changes: 1 addition & 1 deletion memory-management/src/aligned_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl<const ALIGN: usize, T: AsRef<[u8]>> From<T> for AlignedMemory<ALIGN> {

#[cfg(test)]
mod tests {
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {super::*, std::io::Write};

fn do_test<const ALIGN: usize>() {
Expand Down
2 changes: 1 addition & 1 deletion memory-management/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(clippy::integer_arithmetic)]
#![deny(clippy::arithmetic_side_effects)]
pub mod aligned_memory;

/// Returns true if `ptr` is aligned to `align`.
Expand Down
2 changes: 1 addition & 1 deletion merkle-tree/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]

#[cfg(target_os = "solana")]
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion metrics/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
pub mod counter;
pub mod datapoint;
pub mod metrics;
Expand Down
2 changes: 1 addition & 1 deletion net-shaper/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
clap::{crate_description, crate_name, crate_version, Arg, ArgMatches, Command},
rand::{thread_rng, Rng},
Expand Down
2 changes: 1 addition & 1 deletion net-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! The `net_utils` module assists with networking
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use {
crossbeam_channel::unbounded,
log::*,
Expand Down
2 changes: 1 addition & 1 deletion perf/benches/dedup.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![feature(test)]

extern crate test;
Expand Down
2 changes: 1 addition & 1 deletion perf/benches/shrink.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![feature(test)]

extern crate test;
Expand Down
Loading

0 comments on commit 017df02

Please sign in to comment.