Rename integer_arithmetic to arithmetic_side_effects

This commit is contained in:
Pawan Dhananjay
2023-07-13 12:31:30 -07:00
parent 0c7eed5e58
commit aa50c1afab
12 changed files with 16 additions and 16 deletions

View File

@@ -442,7 +442,7 @@ impl<T: EthSpec> BeaconState<T> {
}
/// Specialised deserialisation method that uses the `ChainSpec` as context.
#[allow(clippy::integer_arithmetic)]
#[allow(clippy::arithmetic_side_effects)]
pub fn from_ssz_bytes(bytes: &[u8], spec: &ChainSpec) -> Result<Self, ssz::DecodeError> {
// Slot is after genesis_time (u64) and genesis_validators_root (Hash256).
let slot_start = <u64 as Decode>::ssz_fixed_len() + <Hash256 as Decode>::ssz_fixed_len();

View File

@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use super::BeaconState;
use crate::*;

View File

@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
#![allow(clippy::disallowed_methods)]
#![allow(clippy::indexing_slicing)]

View File

@@ -451,7 +451,7 @@ impl ChainSpec {
Hash256::from(domain)
}
#[allow(clippy::integer_arithmetic)]
#[allow(clippy::arithmetic_side_effects)]
pub const fn attestation_subnet_prefix_bits(&self) -> u32 {
let attestation_subnet_count_bits = self.attestation_subnet_count.ilog2();
self.attestation_subnet_extra_bits as u32 + attestation_subnet_count_bits

View File

@@ -106,7 +106,7 @@ impl<T: EthSpec> ExecutionPayload<T> {
}
}
#[allow(clippy::integer_arithmetic)]
#[allow(clippy::arithmetic_side_effects)]
/// Returns the maximum size of an execution payload.
pub fn max_execution_payload_merge_size() -> usize {
// Fixed part
@@ -117,7 +117,7 @@ impl<T: EthSpec> ExecutionPayload<T> {
+ (T::max_transactions_per_payload() * (ssz::BYTES_PER_LENGTH_OFFSET + T::max_bytes_per_transaction()))
}
#[allow(clippy::integer_arithmetic)]
#[allow(clippy::arithmetic_side_effects)]
/// Returns the maximum size of an execution payload.
pub fn max_execution_payload_capella_size() -> usize {
// Fixed part

View File

@@ -3,7 +3,7 @@
#![cfg_attr(
not(test),
deny(
clippy::integer_arithmetic,
clippy::arithmetic_side_effects,
clippy::disallowed_methods,
clippy::indexing_slicing
)

View File

@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use crate::{Hash256, ParticipationFlags, Unsigned, VariableList};
use cached_tree_hash::{int_log, CacheArena, CachedTreeHash, Error, TreeHashCache};

View File

@@ -72,7 +72,7 @@ impl SubnetId {
.into())
}
#[allow(clippy::integer_arithmetic)]
#[allow(clippy::arithmetic_side_effects)]
/// Computes the set of subnets the node should be subscribed to during the current epoch,
/// along with the first epoch in which these subscriptions are no longer valid.
pub fn compute_subnets_for_epoch<T: EthSpec>(

View File

@@ -1,4 +1,4 @@
#![allow(clippy::integer_arithmetic)]
#![allow(clippy::arithmetic_side_effects)]
use std::fmt::Debug;