Skip to content

Commit 2732714

Browse files
tylitianruiabhinav
authored andcommitted
internal/readme: Simplify if condition (#945)
Check for "both true" or "both false" is easily implemented as `x == y`.
1 parent 2f8e331 commit 2732714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/readme/readme.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func (b benchmarkRowsByTime) Less(i, j int) bool {
234234
leftZap, rightZap := strings.Contains(left.Name, "zap"), strings.Contains(right.Name, "zap")
235235

236236
// If neither benchmark is for zap or both are, sort by time.
237-
if !(leftZap || rightZap) || (leftZap && rightZap) {
237+
if leftZap == rightZap {
238238
return left.Time.Nanoseconds() < right.Time.Nanoseconds()
239239
}
240240
// Sort zap benchmark first.

0 commit comments

Comments
 (0)