From 2e0065859aec1f53f3d2be76d9d9d433046d9885 Mon Sep 17 00:00:00 2001 From: clabby Date: Sun, 24 Sep 2023 01:38:20 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Clean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yaml | 2 +- crates/mipsevm/src/memory.rs | 2 +- crates/mipsevm/src/mips/instrumented.rs | 2 +- crates/mipsevm/src/utils.rs | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ed50d34..2015ba6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: with: cache-on-failure: true - name: cargo test - run: cargo test --all --all-features --release + run: cargo test --all --all-features cargo-lint: runs-on: ubuntu-latest timeout-minutes: 20 diff --git a/crates/mipsevm/src/memory.rs b/crates/mipsevm/src/memory.rs index fb981ff..6f488e4 100644 --- a/crates/mipsevm/src/memory.rs +++ b/crates/mipsevm/src/memory.rs @@ -149,7 +149,7 @@ impl Memory { let left = self.merkleize_subtree(g_index << 1)?; let right = self.merkleize_subtree((g_index << 1) | 1)?; - let result = keccak_concat_fixed(left.into(), right.into()); + let result = keccak_concat_fixed(*left, *right); self.nodes.insert(g_index, Some(result)); diff --git a/crates/mipsevm/src/mips/instrumented.rs b/crates/mipsevm/src/mips/instrumented.rs index adab6a3..124024b 100644 --- a/crates/mipsevm/src/mips/instrumented.rs +++ b/crates/mipsevm/src/mips/instrumented.rs @@ -14,7 +14,7 @@ pub(crate) const MIPS_EINVAL: u32 = 0x16; /// To perform an instruction step on the MIPS emulator, use the [InstrumentedState::step] method. pub struct InstrumentedState { /// The inner [State] of the MIPS thread context. - pub(crate) state: State, + pub state: State, /// The MIPS thread context's stdout buffer. /// TODO(clabby): Prob not the best place for this. pub(crate) std_out: BufWriter, diff --git a/crates/mipsevm/src/utils.rs b/crates/mipsevm/src/utils.rs index 1fea74b..02f5508 100644 --- a/crates/mipsevm/src/utils.rs +++ b/crates/mipsevm/src/utils.rs @@ -3,7 +3,6 @@ use alloy_primitives::{keccak256, B256}; /// Concatenate two fixed sized arrays together into a new array with minimal reallocation. -#[inline(always)] pub(crate) fn concat_fixed(a: [T; N], b: [T; M]) -> [T; N + M] where T: Copy + Default, @@ -16,7 +15,6 @@ where } /// Hash the concatenation of two fixed sized arrays. -#[inline(always)] pub(crate) fn keccak_concat_fixed(a: [T; N], b: [T; M]) -> B256 where T: Copy + Default,