]> Cypherpunks repositories - gostls13.git/commitdiff
sort: use the builtin min function
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Mon, 7 Aug 2023 13:44:06 +0000 (13:44 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 7 Aug 2023 18:49:55 +0000 (18:49 +0000)
Change-Id: I9603de9abff8d5c8fb9efdf688ff1a5f8c7d19b2
GitHub-Last-Rev: c6fe3acc41a3a9c7d07e3c291985867a704013b1
GitHub-Pull-Request: golang/go#61808
Reviewed-on: https://go-review.googlesource.com/c/go/+/516635
Auto-Submit: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
src/sort/sort_test.go

index 62f51ba6398ff68ed2d4877a0aa4a0018f81ddea..ccb89873afb4ef6bcd9db0c3d6edaad1eded3103 100644 (file)
@@ -415,13 +415,6 @@ func (d *testingData) Swap(i, j int) {
        d.data[i], d.data[j] = d.data[j], d.data[i]
 }
 
-func min(a, b int) int {
-       if a < b {
-               return a
-       }
-       return b
-}
-
 func lg(n int) int {
        i := 0
        for 1<<uint(i) < n {