Remove unneeded `clippy::new_ret_no_self` allows (#31035)
Remove unneeded allows
This commit is contained in:
parent
e8ea722061
commit
3442f184f7
|
@ -23,7 +23,6 @@ pub struct CacheBlockMetaService {
|
||||||
const CACHE_BLOCK_TIME_WARNING_MS: u64 = 150;
|
const CACHE_BLOCK_TIME_WARNING_MS: u64 = 150;
|
||||||
|
|
||||||
impl CacheBlockMetaService {
|
impl CacheBlockMetaService {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
cache_block_meta_receiver: CacheBlockMetaReceiver,
|
cache_block_meta_receiver: CacheBlockMetaReceiver,
|
||||||
blockstore: Arc<Blockstore>,
|
blockstore: Arc<Blockstore>,
|
||||||
|
|
|
@ -20,7 +20,6 @@ pub struct CostUpdateService {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CostUpdateService {
|
impl CostUpdateService {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new(blockstore: Arc<Blockstore>, cost_update_receiver: CostUpdateReceiver) -> Self {
|
pub fn new(blockstore: Arc<Blockstore>, cost_update_receiver: CostUpdateReceiver) -> Self {
|
||||||
let thread_hdl = Builder::new()
|
let thread_hdl = Builder::new()
|
||||||
.name("solCostUpdtSvc".to_string())
|
.name("solCostUpdtSvc".to_string())
|
||||||
|
|
|
@ -30,7 +30,6 @@ pub struct FetchStage {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FetchStage {
|
impl FetchStage {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
sockets: Vec<UdpSocket>,
|
sockets: Vec<UdpSocket>,
|
||||||
tpu_forwards_sockets: Vec<UdpSocket>,
|
tpu_forwards_sockets: Vec<UdpSocket>,
|
||||||
|
|
|
@ -378,7 +378,7 @@ pub struct ReplayStage {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ReplayStage {
|
impl ReplayStage {
|
||||||
#[allow(clippy::new_ret_no_self, clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
config: ReplayStageConfig,
|
config: ReplayStageConfig,
|
||||||
blockstore: Arc<Blockstore>,
|
blockstore: Arc<Blockstore>,
|
||||||
|
|
|
@ -28,7 +28,6 @@ pub struct RewardsRecorderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RewardsRecorderService {
|
impl RewardsRecorderService {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
rewards_receiver: RewardsRecorderReceiver,
|
rewards_receiver: RewardsRecorderReceiver,
|
||||||
max_complete_rewards_slot: Arc<AtomicU64>,
|
max_complete_rewards_slot: Arc<AtomicU64>,
|
||||||
|
|
|
@ -19,7 +19,6 @@ pub struct SamplePerformanceService {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SamplePerformanceService {
|
impl SamplePerformanceService {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
bank_forks: &Arc<RwLock<BankForks>>,
|
bank_forks: &Arc<RwLock<BankForks>>,
|
||||||
blockstore: &Arc<Blockstore>,
|
blockstore: &Arc<Blockstore>,
|
||||||
|
|
|
@ -235,7 +235,6 @@ impl SigVerifier for DisabledSigVerifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SigVerifyStage {
|
impl SigVerifyStage {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new<T: SigVerifier + 'static + Send>(
|
pub fn new<T: SigVerifier + 'static + Send>(
|
||||||
packet_receiver: FindPacketSenderStakeReceiver,
|
packet_receiver: FindPacketSenderStakeReceiver,
|
||||||
verifier: T,
|
verifier: T,
|
||||||
|
|
|
@ -100,7 +100,7 @@ impl Tvu {
|
||||||
/// * `cluster_info` - The cluster_info state.
|
/// * `cluster_info` - The cluster_info state.
|
||||||
/// * `sockets` - fetch, repair, and retransmit sockets
|
/// * `sockets` - fetch, repair, and retransmit sockets
|
||||||
/// * `blockstore` - the ledger itself
|
/// * `blockstore` - the ledger itself
|
||||||
#[allow(clippy::new_ret_no_self, clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
vote_account: &Pubkey,
|
vote_account: &Pubkey,
|
||||||
authorized_voter_keypairs: Arc<RwLock<Vec<Arc<Keypair>>>>,
|
authorized_voter_keypairs: Arc<RwLock<Vec<Arc<Keypair>>>>,
|
||||||
|
|
|
@ -25,7 +25,6 @@ pub struct TransactionStatusService {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TransactionStatusService {
|
impl TransactionStatusService {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
write_transaction_status_receiver: Receiver<TransactionStatusMessage>,
|
write_transaction_status_receiver: Receiver<TransactionStatusMessage>,
|
||||||
max_complete_transaction_status_slot: Arc<AtomicU64>,
|
max_complete_transaction_status_slot: Arc<AtomicU64>,
|
||||||
|
|
|
@ -26,7 +26,6 @@ use {
|
||||||
struct AuthenticatedEncryption;
|
struct AuthenticatedEncryption;
|
||||||
impl AuthenticatedEncryption {
|
impl AuthenticatedEncryption {
|
||||||
#[cfg(not(target_os = "solana"))]
|
#[cfg(not(target_os = "solana"))]
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
fn keygen<T: RngCore + CryptoRng>(rng: &mut T) -> AeKey {
|
fn keygen<T: RngCore + CryptoRng>(rng: &mut T) -> AeKey {
|
||||||
AeKey(rng.gen::<[u8; 16]>())
|
AeKey(rng.gen::<[u8; 16]>())
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,6 @@ impl ElGamalKeypair {
|
||||||
///
|
///
|
||||||
/// This function is randomized. It internally samples a scalar element using `OsRng`.
|
/// This function is randomized. It internally samples a scalar element using `OsRng`.
|
||||||
#[cfg(not(target_os = "solana"))]
|
#[cfg(not(target_os = "solana"))]
|
||||||
#[allow(clippy::new_ret_no_self)]
|
|
||||||
pub fn new_rand() -> Self {
|
pub fn new_rand() -> Self {
|
||||||
ElGamal::keygen()
|
ElGamal::keygen()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue