Skip to content

Commit 82cfd3b

Browse files
committed
remove call to decodeTypedField in encoding
1 parent 7580ec0 commit 82cfd3b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gojay/codegen/struct.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,12 @@ func (s *Struct) generateFieldEncoding(fields []*toolbox.FieldInfo) ([]string, e
276276
templateKey = encodeStructSlice
277277
break main
278278
} else if field.IsSlice {
279-
s.typedFieldDecode(field, field.ComponentType)
280279
templateKey = encodeStructSlice
281280
} else if _, k, ok := s.typedFieldEncode(field, field.Type); ok {
282281
templateKey = k
283282
} else {
284283
// templateKey = decodeUnknown
285-
return "", nil, fmt.Errorf("Unknown type %s for field %s", field.Type, field.Name)
284+
return nil, fmt.Errorf("Unknown type %s for field %s", field.Type, field.Name)
286285
}
287286
}
288287
if templateKey != -1 {

0 commit comments

Comments
 (0)