refactor: Directly swap variable values (#5305)

Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
cui fliter 2024-10-04 01:10:29 +08:00 committed by GitHub
parent 4c052483da
commit 105743be37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,7 +215,7 @@ func (l serviceList) Less(i, j int) bool {
return l[i].Kind < l[j].Kind
}
func (l serviceList) Swap(i, j int) { t := l[i]; l[i] = l[j]; l[j] = t }
func (l serviceList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
func assertEqual(t *testing.T, want, got []*pb.Service) {
t.Helper()