Skip to content

Commit

Permalink
patch for rust 1.81
Browse files Browse the repository at this point in the history
  • Loading branch information
hashcashier committed Dec 18, 2024
1 parent 8f21eff commit 9c01213
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/derive/src/attributes/stateful.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::unnecessary_map_or)]
//! The [`AttributesBuilder`] and it's default implementation.
use crate::{
Expand Down Expand Up @@ -214,7 +215,7 @@ async fn derive_deposits(
for l in r.logs.iter() {
let curr_index = global_index;
global_index += 1;
if l.data.topics().first().is_none_or(|i| *i != DEPOSIT_EVENT_ABI_HASH) {
if l.data.topics().first().map_or(true, |i| *i != DEPOSIT_EVENT_ABI_HASH) {
continue;
}
if l.address != deposit_contract {
Expand Down
3 changes: 2 additions & 1 deletion crates/derive/src/stages/batch/batch_validator.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::unnecessary_map_or)]
//! Contains the [BatchValidator] stage.
use super::NextBatchProvider;
Expand Down Expand Up @@ -55,7 +56,7 @@ where
/// ## Returns
/// - `true` if the origin is behind the parent origin.
fn origin_behind(&self, parent: &L2BlockInfo) -> bool {
self.prev.origin().is_none_or(|origin| origin.number < parent.l1_origin.number)
self.prev.origin().map_or(true, |origin| origin.number < parent.l1_origin.number)
}

/// Updates the [BatchValidator]'s view of the L1 origin blocks.
Expand Down

0 comments on commit 9c01213

Please sign in to comment.