Skip to content

Commit

Permalink
chore: remove unused clippy attributes, redundant_closure (solana-lab…
Browse files Browse the repository at this point in the history
…s#1513)

remove clippy redundant_closure
  • Loading branch information
yihau authored May 29, 2024
1 parent c86625d commit a5fa713
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion cli/src/nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ pub fn process_get_nonce(
config: &CliConfig,
nonce_account_pubkey: &Pubkey,
) -> ProcessResult {
#[allow(clippy::redundant_closure)]
match get_account_with_commitment(rpc_client, nonce_account_pubkey, config.commitment)
.and_then(|ref a| state_from_account(a))?
{
Expand Down
1 change: 0 additions & 1 deletion cli/tests/nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ fn full_battery_tests(
}

#[test]
#[allow(clippy::redundant_closure)]
fn test_create_account_with_seed() {
const ONE_SIG_FEE: f64 = 0.000005;
solana_logger::setup();
Expand Down
1 change: 0 additions & 1 deletion cli/tests/stake.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![allow(clippy::arithmetic_side_effects)]
#![allow(clippy::redundant_closure)]
use {
assert_matches::assert_matches,
solana_cli::{
Expand Down
1 change: 0 additions & 1 deletion cli/tests/transfer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![allow(clippy::arithmetic_side_effects)]
#![allow(clippy::redundant_closure)]
use {
solana_cli::{
check_balance,
Expand Down
3 changes: 0 additions & 3 deletions rpc-client-nonce-utils/src/blockhash_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ impl Source {
Ok((res.0, res.1))
}
Self::NonceAccount(ref pubkey) => {
#[allow(clippy::redundant_closure)]
let data = crate::get_account_with_commitment(rpc_client, pubkey, commitment)
.and_then(|ref a| crate::data_from_account(a))?;
Ok((data.blockhash(), data.fee_calculator))
Expand Down Expand Up @@ -81,7 +80,6 @@ impl Source {
Ok(blockhash)
}
Self::NonceAccount(ref pubkey) => {
#[allow(clippy::redundant_closure)]
let data = crate::get_account_with_commitment(rpc_client, pubkey, commitment)
.and_then(|ref a| crate::data_from_account(a))?;
Ok(data.blockhash())
Expand All @@ -98,7 +96,6 @@ impl Source {
Ok(match self {
Self::Cluster => rpc_client.is_blockhash_valid(blockhash, commitment)?,
Self::NonceAccount(ref pubkey) => {
#[allow(clippy::redundant_closure)]
let _ = crate::get_account_with_commitment(rpc_client, pubkey, commitment)
.and_then(|ref a| crate::data_from_account(a))?;
true
Expand Down
2 changes: 0 additions & 2 deletions rpc-client-nonce-utils/src/nonblocking/blockhash_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ impl Source {
Ok(blockhash)
}
Self::NonceAccount(ref pubkey) => {
#[allow(clippy::redundant_closure)]
let data = nonblocking::get_account_with_commitment(rpc_client, pubkey, commitment)
.await
.and_then(|ref a| nonblocking::data_from_account(a))?;
Expand All @@ -48,7 +47,6 @@ impl Source {
Ok(match self {
Self::Cluster => rpc_client.is_blockhash_valid(blockhash, commitment).await?,
Self::NonceAccount(ref pubkey) => {
#[allow(clippy::redundant_closure)]
let _ = nonblocking::get_account_with_commitment(rpc_client, pubkey, commitment)
.await
.and_then(|ref a| nonblocking::data_from_account(a))?;
Expand Down
1 change: 0 additions & 1 deletion sdk/src/precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ impl Precompile {
where
F: Fn(&Pubkey) -> bool,
{
#![allow(clippy::redundant_closure)]
self.feature
.map_or(true, |ref feature_id| is_enabled(feature_id))
&& self.program_id == *program_id
Expand Down

0 comments on commit a5fa713

Please sign in to comment.