Fix or disable the new clippy::question_mark lint (#2946)
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
This commit is contained in:
parent
2920d838ff
commit
c7a5db3c24
|
@ -189,12 +189,10 @@ pub fn merkle_root_validity(
|
||||||
block: &Block,
|
block: &Block,
|
||||||
transaction_hashes: &[transaction::Hash],
|
transaction_hashes: &[transaction::Hash],
|
||||||
) -> Result<(), BlockError> {
|
) -> Result<(), BlockError> {
|
||||||
if block
|
// TODO: deduplicate zebra-chain and zebra-consensus errors (#2908)
|
||||||
|
block
|
||||||
.check_transaction_network_upgrade_consistency(network)
|
.check_transaction_network_upgrade_consistency(network)
|
||||||
.is_err()
|
.map_err(|_| BlockError::WrongTransactionConsensusBranchId)?;
|
||||||
{
|
|
||||||
return Err(BlockError::WrongTransactionConsensusBranchId);
|
|
||||||
}
|
|
||||||
|
|
||||||
let merkle_root = transaction_hashes.iter().cloned().collect();
|
let merkle_root = transaction_hashes.iter().cloned().collect();
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,8 @@ proptest! {
|
||||||
loop {
|
loop {
|
||||||
update_events.acquire().await.forget();
|
update_events.acquire().await.forget();
|
||||||
|
|
||||||
|
// The refactor suggested by clippy is harder to read and understand.
|
||||||
|
#[allow(clippy::question_mark)]
|
||||||
if status.wait_until_close_to_tip().await.is_err() {
|
if status.wait_until_close_to_tip().await.is_err() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue