Skip to content

Commit 040dd5b

Browse files
rociiukaralabe
authored andcommitted
accounts/abi: refactor Method#Sig() to use index in range iterator directly (#17198)
1 parent dcdd57d commit 040dd5b

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎accounts/abi/method.go‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ type Method struct {
4747
// Please note that "int" is substitute for its canonical representation "int256"
4848
func (method Method) Sig() string {
4949
types := make([]string, len(method.Inputs))
50-
i := 0
51-
for _, input := range method.Inputs {
50+
for i, input := range method.Inputs {
5251
types[i] = input.Type.String()
53-
i++
5452
}
5553
return fmt.Sprintf("%v(%v)", method.Name, strings.Join(types, ","))
5654
}

0 commit comments

Comments
 (0)