Simplify boolean expression

This commit is contained in:
Peter Rifel 2025-08-22 20:19:20 -05:00
parent 9d41b64f2e
commit 7694fce7cd
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -607,7 +607,7 @@ func (a ByScoreDescending) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a ByScoreDescending) Less(i, j int) bool {
if a[i].score != a[j].score {
// ! to sort highest score first
return !(a[i].score < a[j].score)
return a[i].score >= a[j].score
}
// Use name to break ties consistently
return a[i].subnet.Name < a[j].subnet.Name