Skip to content

Commit

Permalink
refactor: Directly swap two variables to optimize code
Browse files Browse the repository at this point in the history
Signed-off-by: jingchanglu <jingchanglu@outlook.com>
  • Loading branch information
jingchanglu committed Sep 19, 2024
1 parent e77545f commit eb68a55
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions embedded/sql/file_sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ func (s *fileSorter) mergeAllChunks() (resultReader, error) {
newChunks[len(chunks)/2] = lastChunk
}

temp := currFile
currFile = outFile
outFile = temp
currFile, outFile = outFile, currFile

_, err = outFile.Seek(0, io.SeekStart)
if err != nil {
Expand Down

0 comments on commit eb68a55

Please sign in to comment.