Skip to content

Commit e5b6c63

Browse files
fix: Simplify equal-case formatting in fmt_change by using to_string() (#12193)
* Update snapshot.rs * Update snapshot.rs --------- Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
1 parent 614eb9a commit e5b6c63

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/forge/src/cmd/snapshot.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,7 @@ fn fmt_pct_change(change: f64) -> String {
542542
fn fmt_change(change: i128) -> String {
543543
match change.cmp(&0) {
544544
Ordering::Less => format!("{change}").green().to_string(),
545-
Ordering::Equal => {
546-
format!("{change}")
547-
}
545+
Ordering::Equal => change.to_string(),
548546
Ordering::Greater => format!("{change}").red().to_string(),
549547
}
550548
}

0 commit comments

Comments
 (0)