Skip to content

Commit

Permalink
optimize if-condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tyltr committed May 17, 2021
1 parent 7b21229 commit 02e09ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/readme/readme.go
Expand Up @@ -234,7 +234,7 @@ func (b benchmarkRowsByTime) Less(i, j int) bool {
leftZap, rightZap := strings.Contains(left.Name, "zap"), strings.Contains(right.Name, "zap")

// If neither benchmark is for zap or both are, sort by time.
if !(leftZap || rightZap) || (leftZap && rightZap) {
if leftZap == rightZap {
return left.Time.Nanoseconds() < right.Time.Nanoseconds()
}
// Sort zap benchmark first.
Expand Down

0 comments on commit 02e09ff

Please sign in to comment.