Skip to content

Commit

Permalink
@rkasiuk review
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Nov 23, 2023
1 parent a7c47a6 commit 21cf8be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/net/eth-wire/src/multiplex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ where
return Poll::Ready(Some(Err(err.into())))
}
} else {
break;
break
}
}
Poll::Pending => {
Expand Down
8 changes: 5 additions & 3 deletions crates/primitives/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl proptest::arbitrary::Arbitrary for Receipt {
#[cfg(feature = "optimism")]
let (deposit_nonce, deposit_receipt_version) = if tx_type == TxType::DEPOSIT {
// The deposit receipt version is only present if the deposit nonce is present
let deposit_receipt_version = _deposit_nonce.is_some().then_some(_deposit_receipt_version).flatten();
let deposit_receipt_version = _deposit_nonce.and(_deposit_receipt_version);
(_deposit_nonce, deposit_receipt_version)
} else {
(None, None)
Expand Down Expand Up @@ -255,8 +255,10 @@ impl<'a> arbitrary::Arbitrary<'a> for Receipt {
#[cfg(feature = "optimism")]
let (deposit_nonce, deposit_receipt_version) = if tx_type == TxType::DEPOSIT {
let deposit_nonce = Option::<u64>::arbitrary(u)?;
let deposit_nonce_version =
deposit_nonce.is_some().then(|| Option::<u64>::arbitrary(u)).transpose()?.flatten();
let deposit_nonce_version = deposit_nonce
.and_then(|_| Some(Option::<u64>::arbitrary(u)))
.transpose()?
.flatten();
(deposit_nonce, deposit_nonce_version)
} else {
(None, None)
Expand Down

0 comments on commit 21cf8be

Please sign in to comment.