Skip to content

Commit 900e589

Browse files
committed
Compare site: fix sign display in total average
1 parent 0a79db2 commit 900e589

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/static/compare.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
435435
&nbsp;({{(summaryPair[1].improvements_avg).toFixed(2)}}%)
436436
</span>
437437
<span class="summary" v-bind:class="percentClass(summaryPair[1].average)">
438-
&nbsp;{{ signIfNegative(summaryPair[1].average) }}{{ (summaryPair[1].average).toFixed(2) }}%
438+
&nbsp;{{ signIfPositive(summaryPair[1].average) }}{{ (summaryPair[1].average).toFixed(2) }}%
439439
</span>
440440
</div>
441441
</div>
@@ -768,11 +768,11 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
768768
prLink(pr) {
769769
return `https://github.com/rust-lang/rust/pull/${pr}`;
770770
},
771-
signIfNegative(pct) {
771+
signIfPositive(pct) {
772772
if (pct >= 0) {
773-
return "";
773+
return "+";
774774
}
775-
return "-";
775+
return "";
776776
},
777777
percentClass(pct) {
778778
let klass = "";

0 commit comments

Comments
 (0)