Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clippy and fmt #568

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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