Skip to content

Commit 2ea4cad

Browse files
committed
refactor: Directly swap variable values
Signed-off-by: cuishuang <imcusg@gmail.com>
1 parent 4a4c55c commit 2ea4cad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/devspace/sync/util_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ func (arr testCaseList) Less(i, j int) bool {
5454
}
5555

5656
func (arr testCaseList) Swap(i, j int) {
57-
x := arr[i]
58-
arr[i] = arr[j]
59-
arr[j] = x
57+
arr[i], arr[j] = arr[j], arr[i]
6058
}
6159

6260
const fileContents = "TestContents"

0 commit comments

Comments
 (0)