Skip to content

Commit

Permalink
chore(ci): make clippy happy (#9)
Browse files Browse the repository at this point in the history
* chore: apply ci suggestions

* chore: rename

* chore: move into workflows folder

* chore: correct feature name
  • Loading branch information
Evalir authored Jul 21, 2024
1 parent 5ab032f commit 5460947
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/basic_transact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn main() {
let mut db = CacheDB::new(EmptyDB::new());

let bytecode = Bytecode::new_raw(hex::decode(CONTRACT_BYTECODE).unwrap().into());
let acc_info = AccountInfo::new(U256::ZERO, 1, bytecode.hash_slow(), bytecode.clone());
let acc_info = AccountInfo::new(U256::ZERO, 1, bytecode.hash_slow(), bytecode);

// insert both the contract code to the contract cache, and the account info to the account cache
db.insert_contract(&mut acc_info.clone());
Expand Down
2 changes: 1 addition & 1 deletion examples/fork_ref_transact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async fn main() -> eyre::Result<()> {
};

// decode bytes to reserves + ts via alloy's abi decode
let return_vals = getReservesCall::abi_decode_returns(&value.data(), true)?;
let return_vals = getReservesCall::abi_decode_returns(value.data(), true)?;

// Print emulated getReserves() call output
println!("Reserve0: {:#?}", return_vals.reserve0);
Expand Down
2 changes: 1 addition & 1 deletion src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ impl<'a, Ext, Db: Database, TrevmState: HasCfg> Trevm<'a, Ext, Db, TrevmState> {
/// this is set to the settings used in the Ethereum mainnet.
///
/// This is a low-level API, and is not intended for general use.
#[cfg(feature = "kzg")]
#[cfg(feature = "c-kzg")]
pub fn set_kzg_settings(
&mut self,
settings: revm::primitives::EnvKzgSettings,
Expand Down
8 changes: 1 addition & 7 deletions src/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,12 @@ pub trait Lifecycle<'a, Ext, Db: Database + DatabaseCommit> {
/// Shanghai lifecycle. This applies the [EIP-4895] post-block system action.
///
/// [EIP-4895]: https://eips.ethereum.org/EIPS/eip-4895
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
pub struct ShanghaiLifecycle<'a> {
/// The withdrawals to be processed.
pub withdrawls: &'a [Withdrawal],
}

impl Default for ShanghaiLifecycle<'_> {
fn default() -> Self {
Self { withdrawls: &[] }
}
}

impl<'a> From<&'a [Withdrawal]> for ShanghaiLifecycle<'a> {
fn from(withdrawls: &'a [Withdrawal]) -> Self {
Self { withdrawls }
Expand Down

0 comments on commit 5460947

Please sign in to comment.