mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
bind: Preallocate capacity for fields slice
This commit is contained in:
parent
2e06fbd409
commit
14bb0f6dec
1 changed files with 1 additions and 1 deletions
|
|
@ -395,7 +395,7 @@ func bindStructTypeGo(kind abi.Type, structs map[string]*tmplStruct) string {
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
names = make(map[string]bool)
|
names = make(map[string]bool)
|
||||||
fields []*tmplField
|
fields = make([]*tmplField, 0, len(kind.TupleElems))
|
||||||
)
|
)
|
||||||
for i, elem := range kind.TupleElems {
|
for i, elem := range kind.TupleElems {
|
||||||
name := capitalise(kind.TupleRawNames[i])
|
name := capitalise(kind.TupleRawNames[i])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue