Skip to content

Commit e08d1fb

Browse files
committed
Combine DISAGREEMENT and errors into footer
1 parent e312fa0 commit e08d1fb

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

site/src/github.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,7 @@ async fn categorize_benchmark(
673673
.map(|(benchmark, _)| format!("- {benchmark}"))
674674
.collect::<Vec<_>>()
675675
.join("\n");
676-
format!(
677-
"\n**Warning ⚠**: The following benchmark(s) failed to build:\n{}\n",
678-
benchmarks,
679-
)
676+
format!("\n**Warning ⚠**: The following benchmark(s) failed to build:\n{benchmarks}\n")
680677
} else {
681678
String::new()
682679
};
@@ -686,13 +683,11 @@ async fn categorize_benchmark(
686683

687684
const DISAGREEMENT: &str = "If you disagree with this performance assessment, \
688685
please file an issue in [rust-lang/rustc-perf](https://github.com/rust-lang/rustc-perf/issues/new).";
686+
let footer = format!("{DISAGREEMENT}{errors}");
689687

690688
if primary.is_none() && secondary.is_none() {
691689
return (
692-
format!(
693-
"This benchmark run did not return any relevant results.\n\n{}{}",
694-
DISAGREEMENT, errors
695-
),
690+
format!("This benchmark run did not return any relevant results.\n\n{footer}"),
696691
None,
697692
);
698693
}
@@ -718,7 +713,7 @@ async fn categorize_benchmark(
718713
write_summary_table(&primary, &secondary, true, &mut result);
719714
}
720715

721-
write!(result, "\n{} {}", DISAGREEMENT, errors).unwrap();
716+
write!(result, "\n{footer}").unwrap();
722717

723718
let direction = primary_direction.or(secondary_direction);
724719
(result, direction)

0 commit comments

Comments
 (0)