Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zemse committed Jan 16, 2024
1 parent 47659f3 commit 29fdb3d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bus-mapping/src/precompile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ use revm_precompile::{Precompile, PrecompileError, Precompiles};
#[allow(unused_variables)]
/// Check if address is a precompiled or not.
pub fn is_precompiled(address: &Address) -> bool {
#[cfg(target_arch = "wasm32")]
unreachable!();

#[cfg(not(target_arch = "wasm32"))]
return Precompiles::berlin()
Precompiles::berlin()
.get(address.as_fixed_bytes())
.is_some();
#[cfg(target_arch = "wasm32")]
unreachable!()
.is_some()
}

#[allow(unused_variables)]
pub(crate) fn execute_precompiled(
address: &Address,
input: &[u8],
gas: u64,
) -> (Vec<u8>, u64, bool) {
#[cfg(target_arch = "wasm32")]
return (vec![], 0, false);
unreachable!();

#[cfg(not(target_arch = "wasm32"))]
{
Expand Down

0 comments on commit 29fdb3d

Please sign in to comment.