diff --git a/crates/forge/src/coverage.rs b/crates/forge/src/coverage.rs index 46baeddeda0ae..55edb5eefa37f 100644 --- a/crates/forge/src/coverage.rs +++ b/crates/forge/src/coverage.rs @@ -166,11 +166,8 @@ impl CoverageReporter for LcovReporter { } } CoverageItemKind::Branch { branch_id, path_id, .. } => { - writeln!( - out, - "BRDA:{line},{branch_id},{path_id},{}", - if hits == 0 { "-" } else { &hits.to_string() } - )?; + let hits = if hits == 0 { "-" } else { &hits.to_string() }; + writeln!(out, "BRDA:{line},{branch_id},{path_id},{hits}")?; } } }