diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2024-05-19 16:02:16 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2024-05-19 16:38:21 +1000 |
commit | fdff2dec79c30d45af9d3330907f40ebb75b53d4 (patch) | |
tree | a36752dfb1b0e7d572d6c3928cfc4343c9859598 /pkg/commands/git_commands/sync_test.go | |
parent | 9124d8dbaa4b343c35819953464e053da82c3763 (diff) |
Remove redundant variable dedeclarations
In go 1.22, loop variables are redeclared with each iteration of the
loop, rather than simple updated on each iteration. This means that we
no longer need to manually redeclare variables when they're closed over
by a function.
Diffstat (limited to 'pkg/commands/git_commands/sync_test.go')
-rw-r--r-- | pkg/commands/git_commands/sync_test.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/pkg/commands/git_commands/sync_test.go b/pkg/commands/git_commands/sync_test.go index 93e6de1b1..f5f281e14 100644 --- a/pkg/commands/git_commands/sync_test.go +++ b/pkg/commands/git_commands/sync_test.go @@ -86,7 +86,6 @@ func TestSyncPush(t *testing.T) { } for _, s := range scenarios { - s := s t.Run(s.testName, func(t *testing.T) { instance := buildSyncCommands(commonDeps{}) task := gocui.NewFakeTask() @@ -124,7 +123,6 @@ func TestSyncFetch(t *testing.T) { } for _, s := range scenarios { - s := s t.Run(s.testName, func(t *testing.T) { instance := buildSyncCommands(commonDeps{}) instance.UserConfig.Git.FetchAll = s.fetchAllConfig @@ -163,7 +161,6 @@ func TestSyncFetchBackground(t *testing.T) { } for _, s := range scenarios { - s := s t.Run(s.testName, func(t *testing.T) { instance := buildSyncCommands(commonDeps{}) instance.UserConfig.Git.FetchAll = s.fetchAllConfig |