Resolve nightly-2021-10-05 clippy complaints
This commit is contained in:
@ -34,6 +34,7 @@ impl Source {
|
||||
Ok((res.0, res.1))
|
||||
}
|
||||
Self::NonceAccount(ref pubkey) => {
|
||||
#[allow(clippy::redundant_closure)]
|
||||
let data = nonce_utils::get_account_with_commitment(rpc_client, pubkey, commitment)
|
||||
.and_then(|ref a| nonce_utils::data_from_account(a))?;
|
||||
Ok((data.blockhash, data.fee_calculator))
|
||||
@ -80,6 +81,7 @@ impl Source {
|
||||
Ok(blockhash)
|
||||
}
|
||||
Self::NonceAccount(ref pubkey) => {
|
||||
#[allow(clippy::redundant_closure)]
|
||||
let data = nonce_utils::get_account_with_commitment(rpc_client, pubkey, commitment)
|
||||
.and_then(|ref a| nonce_utils::data_from_account(a))?;
|
||||
Ok(data.blockhash)
|
||||
@ -96,6 +98,7 @@ impl Source {
|
||||
Ok(match self {
|
||||
Self::Cluster => rpc_client.is_blockhash_valid(blockhash, commitment)?,
|
||||
Self::NonceAccount(ref pubkey) => {
|
||||
#[allow(clippy::redundant_closure)]
|
||||
let _ = nonce_utils::get_account_with_commitment(rpc_client, pubkey, commitment)
|
||||
.and_then(|ref a| nonce_utils::data_from_account(a))?;
|
||||
true
|
||||
|
Reference in New Issue
Block a user