mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
add match_same_arms clippy lint (#8549)
This commit is contained in:
@ -92,6 +92,7 @@ impl PoolError {
|
||||
/// erroneous transaction.
|
||||
#[inline]
|
||||
pub fn is_bad_transaction(&self) -> bool {
|
||||
#[allow(clippy::match_same_arms)]
|
||||
match &self.kind {
|
||||
PoolErrorKind::AlreadyImported => {
|
||||
// already imported but not bad
|
||||
@ -213,6 +214,7 @@ impl InvalidPoolTransactionError {
|
||||
/// context of the transaction pool and warrants peer penalization.
|
||||
///
|
||||
/// See [`PoolError::is_bad_transaction`].
|
||||
#[allow(clippy::match_same_arms)]
|
||||
#[inline]
|
||||
fn is_bad_transaction(&self) -> bool {
|
||||
match self {
|
||||
@ -243,10 +245,10 @@ impl InvalidPoolTransactionError {
|
||||
// settings
|
||||
false
|
||||
}
|
||||
InvalidTransactionError::OldLegacyChainId => true,
|
||||
InvalidTransactionError::ChainIdMismatch => true,
|
||||
InvalidTransactionError::GasUintOverflow => true,
|
||||
InvalidTransactionError::TxTypeNotSupported => true,
|
||||
InvalidTransactionError::OldLegacyChainId |
|
||||
InvalidTransactionError::ChainIdMismatch |
|
||||
InvalidTransactionError::GasUintOverflow |
|
||||
InvalidTransactionError::TxTypeNotSupported |
|
||||
InvalidTransactionError::SignerAccountHasBytecode => true,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1036,7 +1036,7 @@ impl PoolTransaction for EthPooledTransaction {
|
||||
///
|
||||
/// This will return `None` for non-EIP1559 transactions
|
||||
fn max_priority_fee_per_gas(&self) -> Option<u128> {
|
||||
#[allow(unreachable_patterns)]
|
||||
#[allow(unreachable_patterns, clippy::match_same_arms)]
|
||||
match &self.transaction.transaction {
|
||||
Transaction::Legacy(_) | Transaction::Eip2930(_) => None,
|
||||
Transaction::Eip1559(tx) => Some(tx.max_priority_fee_per_gas),
|
||||
|
||||
Reference in New Issue
Block a user