mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Add missing_const_for_fn clippy lint (#8498)
This commit is contained in:
@ -303,7 +303,10 @@ pub enum MessageValidationKind {
|
||||
impl MessageValidationKind {
|
||||
/// Returns an `EngineObjectValidationError` based on the given
|
||||
/// `VersionSpecificValidationError` and the current validation kind.
|
||||
pub fn to_error(self, error: VersionSpecificValidationError) -> EngineObjectValidationError {
|
||||
pub const fn to_error(
|
||||
self,
|
||||
error: VersionSpecificValidationError,
|
||||
) -> EngineObjectValidationError {
|
||||
match self {
|
||||
Self::Payload => EngineObjectValidationError::Payload(error),
|
||||
Self::PayloadAttributes => EngineObjectValidationError::PayloadAttributes(error),
|
||||
|
||||
@ -24,7 +24,7 @@ where
|
||||
{
|
||||
/// Construct a [PayloadOrAttributes] from an [ExecutionPayload] and optional parent beacon
|
||||
/// block root.
|
||||
pub fn from_execution_payload(
|
||||
pub const fn from_execution_payload(
|
||||
payload: &'a ExecutionPayload,
|
||||
parent_beacon_block_root: Option<B256>,
|
||||
) -> Self {
|
||||
@ -56,7 +56,7 @@ where
|
||||
}
|
||||
|
||||
/// Return a [MessageValidationKind] for the payload or attributes.
|
||||
pub fn message_validation_kind(&self) -> MessageValidationKind {
|
||||
pub const fn message_validation_kind(&self) -> MessageValidationKind {
|
||||
match self {
|
||||
Self::ExecutionPayload { .. } => MessageValidationKind::Payload,
|
||||
Self::PayloadAttributes(_) => MessageValidationKind::PayloadAttributes,
|
||||
|
||||
Reference in New Issue
Block a user