Merge pull request #111314 from BinacsLee/binacs/cleanup-use-clone-to-avoid-interim-slice

cleanup: use sets.Clone() to avoid interim slice
This commit is contained in:
Kubernetes Prow Robot 2022-10-04 07:34:22 -07:00 committed by GitHub
commit afebf498d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ func (u *uidTrackingExpectations) getExpectedUIDs(controllerKey string) sets.Str
return nil
}
uids.RLock()
set := sets.NewString(uids.set.UnsortedList()...)
set := uids.set.Clone()
uids.RUnlock()
return set
}