]> Cypherpunks repositories - gostls13.git/commitdiff
sort: fix typo, was a mixup between identifiers 'unsorted' and 'data'
authorNeven Sajko <nsajko@gmail.com>
Sat, 10 Feb 2018 23:30:34 +0000 (00:30 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 19 Mar 2018 13:09:29 +0000 (13:09 +0000)
Change-Id: If9ad8ae663f007efe43cc35631713565fa754e93
Reviewed-on: https://go-review.googlesource.com/93237
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/sort/sort_test.go

index 092135e588d00db73ef6f5978b462d33f3d51c83..4516f05e16e69dcd239359efa43d16c38afb279c 100644 (file)
@@ -194,7 +194,7 @@ func BenchmarkSortString1K_Slice(b *testing.B) {
 func BenchmarkStableString1K(b *testing.B) {
        b.StopTimer()
        unsorted := make([]string, 1<<10)
-       for i := 0; i < len(data); i++ {
+       for i := range unsorted {
                unsorted[i] = strconv.Itoa(i ^ 0x2cc)
        }
        data := make([]string, len(unsorted))