Merge pull request #111267 from BinacsLee/binacs/remove-unneeded-unsortedlist

cleanup: use sets.Len() instead of len(sets.UnsortedList()) in the isEmpty function
This commit is contained in:
Kubernetes Prow Robot 2022-07-19 20:34:36 -07:00 committed by GitHub
commit b96a04df90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,7 @@ func (set *IPSet) validateEntry(entry *utilipset.Entry) bool {
}
func (set *IPSet) isEmpty() bool {
return len(set.activeEntries.UnsortedList()) == 0
return set.activeEntries.Len() == 0
}
func (set *IPSet) getComment() string {