Skip to content

Commit

Permalink
Replace for loop with call to copy for slice
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-dev-autofix[bot] authored May 9, 2022
1 parent 8444223 commit 7ed5d8d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ func HasAnySellersFromCity(sellers []Seller, city string) {
fmt.Println("allSellers is empty")
}

for i, x := range sellers {
allSellers[i] = x
}
copy(allSellers, sellers)

combinedSellers := []Seller{}

Expand Down

0 comments on commit 7ed5d8d

Please sign in to comment.