Skip to content

Commit 6d7b37b

Browse files
fix: Remove redundant .to_string() after format! in test summary table (#12192)
* Update summary.rs * Update snapshot.rs --------- Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
1 parent e5b6c63 commit 6d7b37b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/forge/src/cmd/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ fn build_gas_snapshot_table(tests: &[SuiteTestResult]) -> Table {
334334
let mut row = Row::new();
335335
row.add_cell(Cell::new(test.contract_name()));
336336
row.add_cell(Cell::new(&test.signature));
337-
row.add_cell(Cell::new(test.result.kind.report().to_string()));
337+
row.add_cell(Cell::new(test.result.kind.report()));
338338
table.add_row(row);
339339
}
340340

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl TestSummaryReport {
114114

115115
if self.is_detailed {
116116
row.add_cell(Cell::new(suite_path));
117-
row.add_cell(Cell::new(format!("{:.2?}", suite.duration).to_string()));
117+
row.add_cell(Cell::new(format!("{:.2?}", suite.duration)));
118118
}
119119

120120
table.add_row(row);

0 commit comments

Comments
 (0)