1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-11 12:48:10 +03:00

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.
This commit is contained in:
Jesse Duffield
2024-05-19 16:02:16 +10:00
parent 9124d8dbaa
commit fdff2dec79
38 changed files with 3 additions and 84 deletions

View File

@ -505,8 +505,6 @@ func (self *CommitLoader) getExistingMainBranches() []string {
for i, branchName := range mainBranches {
wg.Add(1)
i := i
branchName := branchName
go utils.Safe(func() {
defer wg.Done()