From 025134b0d1b5e5ea2c5216fe4ccb060ab1bea59a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 12 Mar 2018 11:40:34 +0100 Subject: [PATCH] runtime: simplify range expressions in tests Generated by running gofmt -s on the files in question. Change-Id: If6578b150e1bfced8657196d2af01f5d36879f93 Reviewed-on: https://go-review.googlesource.com/100135 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/runtime/rand_test.go | 2 +- src/runtime/string_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/rand_test.go b/src/runtime/rand_test.go index f8831b05f9f..1b84c79d24f 100644 --- a/src/runtime/rand_test.go +++ b/src/runtime/rand_test.go @@ -25,7 +25,7 @@ func BenchmarkFastrandHashiter(b *testing.B) { } b.RunParallel(func(pb *testing.PB) { for pb.Next() { - for _ = range m { + for range m { break } } diff --git a/src/runtime/string_test.go b/src/runtime/string_test.go index 7633cfde046..c6e925d2e07 100644 --- a/src/runtime/string_test.go +++ b/src/runtime/string_test.go @@ -125,7 +125,7 @@ func BenchmarkRuneIterate(b *testing.B) { for _, sd := range stringdata { b.Run(sd.name, func(b *testing.B) { for i := 0; i < b.N; i++ { - for _ = range sd.data { + for range sd.data { } } }) @@ -135,7 +135,7 @@ func BenchmarkRuneIterate(b *testing.B) { for _, sd := range stringdata { b.Run(sd.name, func(b *testing.B) { for i := 0; i < b.N; i++ { - for _, _ = range sd.data { + for range sd.data { } } })