From b5aefe07e5afe2fd5d49c6a4219cc826b3e4e34e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 14 Oct 2025 11:40:26 +0200 Subject: all: remove unnecessary loop variable copies in tests Copying the loop variable is no longer necessary since Go 1.22. Change-Id: Iebb21dac44a20ec200567f1d786f105a4ee4999d Reviewed-on: https://go-review.googlesource.com/c/go/+/711640 Reviewed-by: Florian Lehner Auto-Submit: Damien Neil Reviewed-by: Dmitri Shuralyov Reviewed-by: Damien Neil Auto-Submit: Tobias Klauser LUCI-TryBot-Result: Go LUCI --- src/time/sleep_test.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/time') diff --git a/src/time/sleep_test.go b/src/time/sleep_test.go index b9e81b98fe..c87f420f8f 100644 --- a/src/time/sleep_test.go +++ b/src/time/sleep_test.go @@ -937,7 +937,6 @@ func BenchmarkParallelTimerLatency(b *testing.B) { wg.Add(timerCount) atomic.StoreInt32(&count, 0) for j := 0; j < timerCount; j++ { - j := j expectedWakeup := Now().Add(delay) AfterFunc(delay, func() { late := Since(expectedWakeup) @@ -1011,7 +1010,6 @@ func BenchmarkStaggeredTickerLatency(b *testing.B) { var wg sync.WaitGroup wg.Add(tickerCount) for j := 0; j < tickerCount; j++ { - j := j doWork(delay / Duration(gmp)) expectedWakeup := Now().Add(delay) ticker := NewTicker(delay) -- cgit v1.3-5-g9baa