Browse Source

Refactor: optimize println!()

Clippy 1.58.0 complains about `format!()` inside `println!()` being
inefficient
pull/1782/head
RageKnify 3 years ago
parent
commit
7f18d7a851
No known key found for this signature in database
GPG Key ID: 85888AA0534EEE81
  1. 5
      boa_tester/src/results.rs

5
boa_tester/src/results.rs

@ -253,11 +253,9 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) {
diff_format(panic_diff), diff_format(panic_diff),
); );
println!( println!(
"| Conformance | {:.2}% | {:.2}% | {} |", "| Conformance | {:.2}% | {:.2}% | {}{}{:.2}%{} |",
base_conformance, base_conformance,
new_conformance, new_conformance,
format!(
"{}{}{:.2}%{}",
if conformance_diff.abs() > f64::EPSILON { if conformance_diff.abs() > f64::EPSILON {
"**" "**"
} else { } else {
@ -270,7 +268,6 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) {
} else { } else {
"" ""
}, },
),
); );
if !test_diff.fixed.is_empty() { if !test_diff.fixed.is_empty() {

Loading…
Cancel
Save