Skip to content

Commit 8ba8456

Browse files
authored
Merge pull request #1270 from rust-lang/summary-relevance
Do not post summary table to PR if both categories are not relevant
2 parents 501c5c4 + 3810213 commit 8ba8456

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

site/src/github.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -713,11 +713,13 @@ async fn categorize_benchmark(
713713
);
714714
write!(result, "\n\n").unwrap();
715715

716-
let (primary, secondary) = (
717-
primary.unwrap_or_else(|| ComparisonSummary::empty()),
718-
secondary.unwrap_or_else(|| ComparisonSummary::empty()),
719-
);
720-
write_summary_table(&primary, &secondary, &mut result);
716+
if primary_direction.is_some() || secondary_direction.is_some() {
717+
let (primary, secondary) = (
718+
primary.unwrap_or_else(|| ComparisonSummary::empty()),
719+
secondary.unwrap_or_else(|| ComparisonSummary::empty()),
720+
);
721+
write_summary_table(&primary, &secondary, &mut result);
722+
}
721723

722724
write!(result, "\n{}", DISAGREEMENT).unwrap();
723725

0 commit comments

Comments
 (0)