Skip to content

Commit

Permalink
chore: remove clippy::manual_unwarp_or_default (paradigmxyz#10146)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg authored Aug 6, 2024
1 parent c4b5f5e commit d29c5a8
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions crates/rpc/rpc-eth-api/src/helpers/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,27 +389,26 @@ pub trait EthTransactions: LoadTransaction {
) => {
// As per the EIP, we follow the same semantics as EIP-1559.
Some(TypedTransactionRequest::EIP4844(EIP4844TransactionRequest {
chain_id: 0,
nonce: nonce.unwrap_or_default(),
max_priority_fee_per_gas: U256::from(
max_priority_fee_per_gas.unwrap_or_default(),
),
max_fee_per_gas: U256::from(max_fee_per_gas.unwrap_or_default()),
gas_limit: U256::from(gas.unwrap_or_default()),
value: value.unwrap_or_default(),
input: data.into_input().unwrap_or_default(),
#[allow(clippy::manual_unwrap_or_default)] // clippy is suggesting here unwrap_or_default
to: match to {
Some(TxKind::Call(to)) => to,
_ => Address::default(),
},
access_list: access_list.unwrap_or_default(),

// eip-4844 specific.
max_fee_per_blob_gas: U256::from(max_fee_per_blob_gas),
blob_versioned_hashes,
sidecar,
}))
chain_id: 0,
nonce: nonce.unwrap_or_default(),
max_priority_fee_per_gas: U256::from(
max_priority_fee_per_gas.unwrap_or_default(),
),
max_fee_per_gas: U256::from(max_fee_per_gas.unwrap_or_default()),
gas_limit: U256::from(gas.unwrap_or_default()),
value: value.unwrap_or_default(),
input: data.into_input().unwrap_or_default(),
to: match to {
Some(TxKind::Call(to)) => to,
_ => Address::default(),
},
access_list: access_list.unwrap_or_default(),

// eip-4844 specific.
max_fee_per_blob_gas: U256::from(max_fee_per_blob_gas),
blob_versioned_hashes,
sidecar,
}))
}

_ => None,
Expand Down

0 comments on commit d29c5a8

Please sign in to comment.