Skip to content

Commit 90c970c

Browse files
plamerdimakgopherbot
authored andcommitted
net: remove unnecessary loop variable copies in tests
Similar to CL 711640. Change-Id: I5cd9470138c80094eeb497cf4652d6a29cd795a6 GitHub-Last-Rev: 603fb5f GitHub-Pull-Request: #76253 Reviewed-on: https://go-review.googlesource.com/c/go/+/719600 Auto-Submit: Damien Neil <[email protected]> Reviewed-by: Mark Freeman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Damien Neil <[email protected]>
1 parent 9772d3a commit 90c970c

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

src/net/lookup_windows_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ func toJson(v any) string {
3030

3131
func testLookup(t *testing.T, fn func(*testing.T, *Resolver, string)) {
3232
for _, def := range []bool{true, false} {
33-
def := def
3433
for _, server := range nslookupTestServers {
35-
server := server
3634
var name string
3735
if def {
3836
name = "default/"

src/net/unixsock_windows_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ func TestUnixConnLocalWindows(t *testing.T) {
2020
}
2121
handler := func(ls *localServer, ln Listener) {}
2222
for _, laddr := range []string{"", testUnixAddr(t)} {
23-
laddr := laddr
2423
taddr := testUnixAddr(t)
2524
ta, err := ResolveUnixAddr("unix", taddr)
2625
if err != nil {

src/net/url/url_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,6 @@ func TestURLRedacted(t *testing.T) {
880880
}
881881

882882
for _, tt := range cases {
883-
t := t
884883
t.Run(tt.name, func(t *testing.T) {
885884
if g, w := tt.url.Redacted(), tt.want; g != w {
886885
t.Fatalf("got: %q\nwant: %q", g, w)

0 commit comments

Comments
 (0)