Skip to content

Commit 7a40d87

Browse files
authored
patch for rust 1.81 (op-rs#867)
1 parent 8f21eff commit 7a40d87

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace.package]
22
edition = "2021"
33
license = "MIT"
4-
rust-version = "1.83"
4+
rust-version = "1.81"
55
authors = ["clabby", "refcell"]
66
homepage = "https://github.com/anton-rs/kona"
77
repository = "https://github.com/anton-rs/kona"

Diff for: build/asterisc/asterisc-repro.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
7676
pkg-config
7777

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

Diff for: crates/derive/src/attributes/stateful.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::unnecessary_map_or)]
12
//! The [`AttributesBuilder`] and it's default implementation.
23
34
use crate::{
@@ -214,7 +215,7 @@ async fn derive_deposits(
214215
for l in r.logs.iter() {
215216
let curr_index = global_index;
216217
global_index += 1;
217-
if l.data.topics().first().is_none_or(|i| *i != DEPOSIT_EVENT_ABI_HASH) {
218+
if l.data.topics().first().map_or(true, |i| *i != DEPOSIT_EVENT_ABI_HASH) {
218219
continue;
219220
}
220221
if l.address != deposit_contract {

Diff for: crates/derive/src/stages/batch/batch_validator.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::unnecessary_map_or)]
12
//! Contains the [BatchValidator] stage.
23
34
use super::NextBatchProvider;
@@ -55,7 +56,7 @@ where
5556
/// ## Returns
5657
/// - `true` if the origin is behind the parent origin.
5758
fn origin_behind(&self, parent: &L2BlockInfo) -> bool {
58-
self.prev.origin().is_none_or(|origin| origin.number < parent.l1_origin.number)
59+
self.prev.origin().map_or(true, |origin| origin.number < parent.l1_origin.number)
5960
}
6061

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

0 commit comments

Comments
 (0)