mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +00:00
cleanup: use sets.Clone() to avoid interim slice
This commit is contained in:
parent
303f47c0c0
commit
ae0c7b1ffb
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user