This commit is contained in:
q 2026-01-08 23:46:39 +08:00
parent 617419df6c
commit 6cf978c80f

View file

@ -126,7 +126,7 @@ type field struct {
func structFields(typ reflect.Type) ([]field, error) { func structFields(typ reflect.Type) ([]field, error) {
// Convert fields to rlpstruct.Field. // Convert fields to rlpstruct.Field.
n := typ.NumField() n := typ.NumField()
allStructFields := make([]rlpstruct.Field, n) allStructFields := make([]rlpstruct.Field, 0, n)
for i := 0; i < n; i++ { for i := 0; i < n; i++ {
rf := typ.Field(i) rf := typ.Field(i)
allStructFields = append(allStructFields, rlpstruct.Field{ allStructFields = append(allStructFields, rlpstruct.Field{