aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mpallocbits_test.go
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2025-10-14 11:40:26 +0200
committerGopher Robot <gobot@golang.org>2025-10-17 13:10:27 -0700
commitb5aefe07e5afe2fd5d49c6a4219cc826b3e4e34e (patch)
tree3b3576e22ccc48d21f106c65d3bd10f368aaabf6 /src/runtime/mpallocbits_test.go
parent5137c473b64cb157380eb6deb1b60bf6780402b3 (diff)
downloadgo-b5aefe07e5afe2fd5d49c6a4219cc826b3e4e34e.tar.xz
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 <lehner.florian86@gmail.com> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/mpallocbits_test.go')
-rw-r--r--src/runtime/mpallocbits_test.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/runtime/mpallocbits_test.go b/src/runtime/mpallocbits_test.go
index cf49f77507..755f423f96 100644
--- a/src/runtime/mpallocbits_test.go
+++ b/src/runtime/mpallocbits_test.go
@@ -200,7 +200,6 @@ func TestMallocBitsPopcntRange(t *testing.T) {
}
}
for name, v := range tests {
- v := v
t.Run(name, func(t *testing.T) {
b := makePallocBits(v.init)
for _, h := range v.tests {
@@ -291,7 +290,6 @@ func TestPallocBitsSummarize(t *testing.T) {
},
}
for name, v := range tests {
- v := v
t.Run(name, func(t *testing.T) {
b := makePallocBits(v.free)
// In the PallocBits we create 1's represent free spots, but in our actual
@@ -436,7 +434,6 @@ func TestPallocBitsAlloc(t *testing.T) {
}
}
for name, v := range tests {
- v := v
t.Run(name, func(t *testing.T) {
b := makePallocBits(v.before)
for iter, i := range v.hits {
@@ -498,7 +495,6 @@ func TestPallocBitsFree(t *testing.T) {
}
}
for name, v := range tests {
- v := v
t.Run(name, func(t *testing.T) {
b := makePallocBits(v.beforeInv)
invertPallocBits(b)