Skip to content

Commit

Permalink
Fix a golint warning (bazelbuild#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladmos authored May 17, 2018
1 parent 11da328 commit 331d283
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build/rewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,12 +887,12 @@ func (args loadArgs) Swap(i, j int) {

func (args loadArgs) Less(i, j int) bool {
// Arguments with equal "from" and "to" parts are prioritized
equal_i := args.From[i].Name == args.To[i].Name
equal_j := args.From[j].Name == args.To[j].Name
if equal_i != equal_j {
// If equal_i and !equal_j, return true, otherwise false.
// Equivalently, return equal_i.
return equal_i
equalI := args.From[i].Name == args.To[i].Name
equalJ := args.From[j].Name == args.To[j].Name
if equalI != equalJ {
// If equalI and !equalJ, return true, otherwise false.
// Equivalently, return equalI.
return equalI
}
return args.To[i].Name < args.To[j].Name
}
Expand Down

0 comments on commit 331d283

Please sign in to comment.