clippy
This commit is contained in:
committed by
mergify[bot]
parent
01262cda3f
commit
eefcf484cb
@@ -1519,13 +1519,9 @@ impl AccountsDB {
|
||||
hashes = new_hashes.chunks(fanout).map(|x| x.to_vec()).collect();
|
||||
}
|
||||
let mut hasher = Hasher::default();
|
||||
hashes
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.map(|hash| hash)
|
||||
.for_each(|hash| {
|
||||
hasher.hash(hash.as_ref());
|
||||
});
|
||||
hashes.into_iter().flatten().for_each(|hash| {
|
||||
hasher.hash(hash.as_ref());
|
||||
});
|
||||
hasher.result()
|
||||
}
|
||||
|
||||
|
@@ -198,10 +198,7 @@ pub enum HashAgeKind {
|
||||
|
||||
impl HashAgeKind {
|
||||
pub fn is_durable_nonce(&self) -> bool {
|
||||
match self {
|
||||
HashAgeKind::DurableNonce(_, _) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, HashAgeKind::DurableNonce(_, _))
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -23,10 +23,8 @@ pub fn transaction_uses_durable_nonce(tx: &Transaction) -> Option<&CompiledInstr
|
||||
Some(program_id) => system_program::check_id(&program_id),
|
||||
_ => false,
|
||||
}
|
||||
} && match limited_deserialize(&maybe_ix.data) {
|
||||
Ok(SystemInstruction::AdvanceNonceAccount) => true,
|
||||
_ => false,
|
||||
})
|
||||
} && matches!(limited_deserialize(&maybe_ix.data), Ok(SystemInstruction::AdvanceNonceAccount))
|
||||
)
|
||||
}
|
||||
|
||||
pub fn get_nonce_pubkey_from_instruction<'a>(
|
||||
|
Reference in New Issue
Block a user