sdk/program: switch allow to mod-level for integer_arithmetic lint

This commit is contained in:
Trent Nelson 2021-03-12 00:25:52 -07:00 committed by Trent Nelson
parent 5b2b824a53
commit 98d7673a03
17 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! Borsh utils
use borsh::schema::{BorshSchema, Declaration, Definition, Fields};
use std::collections::HashMap;

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! @brief Solana Rust-based BPF program entry point supported by the latest
//! BPFLoader. For more information see './bpf_loader.rs'

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! @brief Solana Rust-based BPF program entry point supported by the original
//! and now deprecated BPFLoader. For more information see
//! './bpf_loader_deprecated.rs'

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! configuration for epochs, slots
/// 1 Epoch = 400 * 8192 ms ~= 55 minutes

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
use crate::clock::DEFAULT_MS_PER_SLOT;
use crate::message::Message;
use crate::secp256k1_program;

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! Defines a composable Instruction type and a memory-efficient CompiledInstruction.
use crate::sanitize::Sanitize;

View File

@ -1,6 +1,5 @@
#![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;

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! A library for generating a message from a sequence of instructions
use crate::sanitize::{Sanitize, SanitizeError};

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
/// There are 10^9 lamports in one SOL
pub const LAMPORTS_PER_SOL: u64 = 1_000_000_000;

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
use crate::{decode_error::DecodeError, instruction::InstructionError, msg, pubkey::PubkeyError};
use borsh::maybestd::io::Error as BorshIoError;
use num_traits::{FromPrimitive, ToPrimitive};

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
use crate::{decode_error::DecodeError, hash::hashv};
use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
use num_derive::{FromPrimitive, ToPrimitive};

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! configuration for network rent
#[repr(C)]

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
use crate::pubkey::Pubkey;
use crate::sanitize::SanitizeError;

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
use serde::{
de::{self, Deserializer, SeqAccess, Visitor},
ser::{self, SerializeTuple, Serializer},

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//!
//! slot history
//!

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! This account contains the serialized transaction instructions
use crate::{instruction::Instruction, sanitize::SanitizeError, sysvar::Sysvar};

View File

@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
use crate::{
declare_sysvar_id,
fee_calculator::FeeCalculator,