Remove unneeded `clippy::new_ret_no_self` allows (#31035)

Remove unneeded allows
This commit is contained in:
Tyera 2023-04-03 20:35:20 -06:00 committed by GitHub
parent e8ea722061
commit 3442f184f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 2 additions and 11 deletions

View File

@ -23,7 +23,6 @@ pub struct CacheBlockMetaService {
const CACHE_BLOCK_TIME_WARNING_MS: u64 = 150;
impl CacheBlockMetaService {
#[allow(clippy::new_ret_no_self)]
pub fn new(
cache_block_meta_receiver: CacheBlockMetaReceiver,
blockstore: Arc<Blockstore>,

View File

@ -20,7 +20,6 @@ pub struct CostUpdateService {
}
impl CostUpdateService {
#[allow(clippy::new_ret_no_self)]
pub fn new(blockstore: Arc<Blockstore>, cost_update_receiver: CostUpdateReceiver) -> Self {
let thread_hdl = Builder::new()
.name("solCostUpdtSvc".to_string())

View File

@ -30,7 +30,6 @@ pub struct FetchStage {
}
impl FetchStage {
#[allow(clippy::new_ret_no_self)]
pub fn new(
sockets: Vec<UdpSocket>,
tpu_forwards_sockets: Vec<UdpSocket>,

View File

@ -378,7 +378,7 @@ pub struct ReplayStage {
}
impl ReplayStage {
#[allow(clippy::new_ret_no_self, clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub fn new(
config: ReplayStageConfig,
blockstore: Arc<Blockstore>,

View File

@ -28,7 +28,6 @@ pub struct RewardsRecorderService {
}
impl RewardsRecorderService {
#[allow(clippy::new_ret_no_self)]
pub fn new(
rewards_receiver: RewardsRecorderReceiver,
max_complete_rewards_slot: Arc<AtomicU64>,

View File

@ -19,7 +19,6 @@ pub struct SamplePerformanceService {
}
impl SamplePerformanceService {
#[allow(clippy::new_ret_no_self)]
pub fn new(
bank_forks: &Arc<RwLock<BankForks>>,
blockstore: &Arc<Blockstore>,

View File

@ -235,7 +235,6 @@ impl SigVerifier for DisabledSigVerifier {
}
impl SigVerifyStage {
#[allow(clippy::new_ret_no_self)]
pub fn new<T: SigVerifier + 'static + Send>(
packet_receiver: FindPacketSenderStakeReceiver,
verifier: T,

View File

@ -100,7 +100,7 @@ impl Tvu {
/// * `cluster_info` - The cluster_info state.
/// * `sockets` - fetch, repair, and retransmit sockets
/// * `blockstore` - the ledger itself
#[allow(clippy::new_ret_no_self, clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
pub fn new(
vote_account: &Pubkey,
authorized_voter_keypairs: Arc<RwLock<Vec<Arc<Keypair>>>>,

View File

@ -25,7 +25,6 @@ pub struct TransactionStatusService {
}
impl TransactionStatusService {
#[allow(clippy::new_ret_no_self)]
pub fn new(
write_transaction_status_receiver: Receiver<TransactionStatusMessage>,
max_complete_transaction_status_slot: Arc<AtomicU64>,

View File

@ -26,7 +26,6 @@ use {
struct AuthenticatedEncryption;
impl AuthenticatedEncryption {
#[cfg(not(target_os = "solana"))]
#[allow(clippy::new_ret_no_self)]
fn keygen<T: RngCore + CryptoRng>(rng: &mut T) -> AeKey {
AeKey(rng.gen::<[u8; 16]>())
}

View File

@ -177,7 +177,6 @@ impl ElGamalKeypair {
///
/// This function is randomized. It internally samples a scalar element using `OsRng`.
#[cfg(not(target_os = "solana"))]
#[allow(clippy::new_ret_no_self)]
pub fn new_rand() -> Self {
ElGamal::keygen()
}