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 19, 2024
1 parent 8f21eff commit d39b314
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace.package]
edition = "2021"
license = "MIT"
rust-version = "1.83"
rust-version = "1.81"
authors = ["clabby", "refcell"]
homepage = "https://github.com/anton-rs/kona"
repository = "https://github.com/anton-rs/kona"
Expand Down
2 changes: 1 addition & 1 deletion build/asterisc/asterisc-repro.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config

# Install rust
ENV RUST_VERSION=1.83.0
ENV RUST_VERSION=1.81.0
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain ${RUST_VERSION} --component rust-src
ENV PATH="/root/.cargo/bin:${PATH}"

Expand Down
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 d39b314

Please sign in to comment.