Skip to content

Commit

Permalink
chore: clippy and fmt (#568)
Browse files Browse the repository at this point in the history
* chore: clippy and fmt

* Update crates/primitives/src/bits.rs
  • Loading branch information
rakita authored Jul 28, 2023
1 parent 30bfa73 commit 5ce9dc9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bins/revme/src/statetest/merkle_trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn trie_account_rlp(acc: &DbAccount) -> Bytes {
}

pub fn trie_root(acc_data: Vec<(H160, Bytes)>) -> B256 {
B256(sec_trie_root::<KeccakHasher, _, _, _>(acc_data.into_iter()).0)
B256(sec_trie_root::<KeccakHasher, _, _, _>(acc_data).0)
}

#[derive(Default, Debug, Clone, PartialEq, Eq)]
Expand Down
2 changes: 2 additions & 0 deletions crates/primitives/src/bits.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::incorrect_clone_impl_on_copy_type)]

use derive_more::{AsRef, Deref};
use fixed_hash::{construct_fixed_hash, impl_fixed_hash_conversions};

Expand Down
4 changes: 2 additions & 2 deletions crates/revm/src/evm_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB,
}
}

fn prepare_call(&mut self, inputs: &mut CallInputs) -> Result<PreparedCall, CallResult> {
fn prepare_call(&mut self, inputs: &CallInputs) -> Result<PreparedCall, CallResult> {
let gas = Gas::new(inputs.gas_limit);
// Load account and get code. Account is now hot.
let Some((bytecode, _)) = self.code(inputs.contract) else {
Expand Down Expand Up @@ -649,7 +649,7 @@ impl<'a, GSPEC: Spec, DB: Database, const INSPECT: bool> EVMImpl<'a, GSPEC, DB,
}

/// Main contract call of the EVM.
fn call_inner(&mut self, inputs: &mut CallInputs) -> CallResult {
fn call_inner(&mut self, inputs: &CallInputs) -> CallResult {
let res = self.prepare_call(inputs);

let prepared_call = match res {
Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/journaled_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl JournaledState {
#[inline(always)]
pub fn check_account_collision(
address: B160,
account: &mut Account,
account: &Account,
num_of_precompiles: usize,
) -> bool {
// Check collision. Bytecode needs to be empty.
Expand Down

0 comments on commit 5ce9dc9

Please sign in to comment.