Skip to content

Commit 253ed68

Browse files
committed
Change the arg name
1 parent 8cf3ea8 commit 253ed68

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

crates/evm/traces/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ pub fn render_trace_arena(arena: &SparsedTraceArena) -> String {
191191
pub fn prune_trace_depth(arena: &mut CallTraceArena, depth: usize) {
192192
for node in arena.nodes_mut() {
193193
if node.trace.depth >= depth {
194-
Vec::clear(&mut node.ordering);
194+
node.ordering.clear();
195195
}
196196
}
197197
}

crates/forge/src/cmd/test/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ pub struct TestArgs {
137137
suppress_successful_traces: bool,
138138

139139
/// Defines the depth of a trace
140-
#[arg(long, short)]
141-
depth: Option<usize>,
140+
#[arg(long)]
141+
trace_depth: Option<usize>,
142142

143143
/// Output test results as JUnit XML report.
144144
#[arg(long, conflicts_with_all = ["quiet", "json", "gas_report", "summary", "list", "show_progress"], help_heading = "Display options")]
@@ -657,8 +657,8 @@ impl TestArgs {
657657
if should_include {
658658
decode_trace_arena(arena, &decoder).await;
659659

660-
if let Some(depth) = self.depth {
661-
prune_trace_depth(arena, depth);
660+
if let Some(trace_depth) = self.trace_depth {
661+
prune_trace_depth(arena, trace_depth);
662662
}
663663

664664
decoded_traces.push(render_trace_arena_inner(arena, false, verbosity > 4));
@@ -1048,8 +1048,8 @@ mod tests {
10481048

10491049
#[test]
10501050
fn depth_trace() {
1051-
let args: TestArgs = TestArgs::parse_from(["foundry-cli", "--depth", "2"]);
1052-
assert!(args.depth.is_some());
1051+
let args: TestArgs = TestArgs::parse_from(["foundry-cli", "--trace-depth", "2"]);
1052+
assert!(args.trace_depth.is_some());
10531053
}
10541054

10551055
// <https://github.com/foundry-rs/foundry/issues/5913>

0 commit comments

Comments
 (0)