Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane committed Feb 26, 2025
1 parent 8118e2c commit 27134ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions crates/consensus/src/receipt/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ impl<T> OpReceiptEnvelope<T> {
}

/// Return true if the transaction was successful.
pub fn is_success(&self) -> bool {
pub const fn is_success(&self) -> bool {
self.status()
}

/// Returns the success status of the receipt's transaction.
pub fn status(&self) -> bool {
pub const fn status(&self) -> bool {
self.as_receipt().unwrap().status.coerce_status()
}

/// Returns the cumulative gas used at this receipt.
pub fn cumulative_gas_used(&self) -> u64 {
pub const fn cumulative_gas_used(&self) -> u64 {
self.as_receipt().unwrap().cumulative_gas_used
}

Expand Down
4 changes: 2 additions & 2 deletions crates/rpc-types-engine/src/payload/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl OpExecutionPayload {
}

/// Returns a mutable reference to the V2 payload, if any.
pub fn as_v2_mut(&mut self) -> &ExecutionPayloadV2 {
pub const fn as_v2_mut(&mut self) -> &ExecutionPayloadV2 {
match self {
Self::V2(payload) => payload,
Self::V3(payload) => &mut payload.payload_inner,
Expand All @@ -313,7 +313,7 @@ impl OpExecutionPayload {
}

/// Returns a mutable reference to the V3 payload, if any.
pub fn as_v3_mut(&mut self) -> Option<&ExecutionPayloadV3> {
pub const fn as_v3_mut(&mut self) -> Option<&ExecutionPayloadV3> {
match self {
Self::V2(_) => None,
Self::V3(payload) => Some(payload),
Expand Down

0 comments on commit 27134ea

Please sign in to comment.