Fix or disable the new clippy::question_mark lint (#2946)

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
This commit is contained in:
teor 2021-10-26 05:34:34 +10:00 committed by GitHub
parent 2920d838ff
commit c7a5db3c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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();

View File

@ -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(());
} }