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;
|
||||
|
||||
impl CacheBlockMetaService {
|
||||
#[allow(clippy::new_ret_no_self)]
|
||||
pub fn new(
|
||||
cache_block_meta_receiver: CacheBlockMetaReceiver,
|
||||
blockstore: Arc<Blockstore>,
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>>>>,
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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]>())
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue