Skip to content

Commit

Permalink
*: fix copyloopvar warnings
Browse files Browse the repository at this point in the history
Go 1.22+ allows to drop these:

  The copy of the 'for' variable "i" can be deleted (Go 1.22+) (copyloopvar)

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Aug 30, 2024
1 parent 74cf5cb commit 565f8cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion pkg/network/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ func testGetBlocksByIndex(t *testing.T, cmd CommandType) {
expectsCmd := make([]CommandType, 10)
expectedHeight := make([][]uint32, 10)
for i := range ps {
i := i
ps[i] = newLocalPeer(t, s)
ps[i].messageHandler = func(t *testing.T, msg *Message) {
require.Equal(t, expectsCmd[i], msg.Command)
Expand Down
1 change: 0 additions & 1 deletion pkg/vm/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ func TestJMPs(t *testing.T) {
}

for i, tc := range testCases {
i := i
t.Run(tc.name, func(t *testing.T) {
for op := opcode.JMP; op < opcode.JMPLEL; op++ {
resOp := op
Expand Down

0 comments on commit 565f8cf

Please sign in to comment.