Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yutianwu committed Aug 2, 2024
1 parent 520525a commit f14ac9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use cfg_if::cfg_if;
use core::hash::Hash;
use once_cell::race::OnceBox;
use std::{boxed::Box, vec::Vec};
use revm_primitives::WRIGHT;

pub fn calc_linear_cost_u32(len: usize, base: u64, word: u64) -> u64 {
(len as u64 + 32 - 1) / 32 * word + base
Expand Down Expand Up @@ -487,7 +488,9 @@ impl PrecompileSpecId {
#[cfg(feature = "opbnb")]
FERMAT => Self::FERMAT,
#[cfg(any(feature = "bsc", feature = "opbnb"))]
HABER | WRIGHT => Self::HABER,
HABER => Self::HABER,
#[cfg(feature = "opbnb")]
WRIGHT => Self::HABER,
#[cfg(feature = "bsc")]
HABER_FIX => Self::HABER,
#[cfg(feature = "bsc")]
Expand Down
4 changes: 2 additions & 2 deletions crates/revm/src/optimism/handler_register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ use crate::{
optimism,
primitives::{
db::Database, spec_to_generic, Account, EVMError, Env, ExecutionResult, HaltReason,
HashMap, InvalidTransaction, ResultAndState, Spec, SpecId, SpecId::REGOLITH, U256,
HashMap, InvalidTransaction, ResultAndState, Spec, SpecId, SpecId::REGOLITH, SpecId::WRIGHT,
U256,
},
Context, ContextPrecompiles, FrameResult,
};
use core::ops::Mul;
use revm_precompile::{secp256r1, PrecompileSpecId};
use std::string::ToString;
use std::sync::Arc;
use crate::primitives::WRIGHT;

pub fn optimism_handle_register<DB: Database, EXT>(handler: &mut EvmHandler<'_, EXT, DB>) {
spec_to_generic!(handler.cfg.spec_id, {
Expand Down

0 comments on commit f14ac9c

Please sign in to comment.