From 15b63eee96e8397d1d0752cf3416ce002218fd35 Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Sun, 11 Feb 2018 00:30:34 +0100 Subject: [PATCH] sort: fix typo, was a mixup between identifiers 'unsorted' and 'data' Change-Id: If9ad8ae663f007efe43cc35631713565fa754e93 Reviewed-on: https://go-review.googlesource.com/93237 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/sort/sort_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sort/sort_test.go b/src/sort/sort_test.go index 092135e588..4516f05e16 100644 --- a/src/sort/sort_test.go +++ b/src/sort/sort_test.go @@ -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)) -- 2.50.0