Skip to content

Commit

Permalink
Remove unneeded clippy::new_ret_no_self allows (#31035)
Browse files Browse the repository at this point in the history
Remove unneeded allows
  • Loading branch information
Tyera authored Apr 4, 2023
1 parent e8ea722 commit 3442f18
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion core/src/cache_block_meta_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
1 change: 0 additions & 1 deletion core/src/cost_update_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
1 change: 0 additions & 1 deletion core/src/fetch_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
2 changes: 1 addition & 1 deletion core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
1 change: 0 additions & 1 deletion core/src/rewards_recorder_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
1 change: 0 additions & 1 deletion core/src/sample_performance_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
1 change: 0 additions & 1 deletion core/src/sigverify_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion core/src/tvu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>>>,
Expand Down
1 change: 0 additions & 1 deletion rpc/src/transaction_status_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
1 change: 0 additions & 1 deletion zk-token-sdk/src/encryption/auth_encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]>())
}
Expand Down
1 change: 0 additions & 1 deletion zk-token-sdk/src/encryption/elgamal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 3442f18

Please sign in to comment.