FieldTag no longer requires specifying the FieldType
This commit is contained in:
parent
fc03a0c4e1
commit
5d0d864510
|
@ -45,9 +45,8 @@ proc writeValue*(w: var EnvvarWriter, value: auto) =
|
|||
type RecordType = type value
|
||||
w.key.add ""
|
||||
value.enumInstanceSerializedFields(fieldName, field):
|
||||
type FieldType = type field
|
||||
w.key[^1] = fieldName
|
||||
w.writeFieldIMPL(FieldTag[RecordType, fieldName, FieldType], field, value)
|
||||
w.writeFieldIMPL(FieldTag[RecordType, fieldName], field, value)
|
||||
discard w.key.pop()
|
||||
|
||||
else:
|
||||
|
|
|
@ -40,9 +40,8 @@ proc writeValue*(w: var WinregWriter, value: auto) =
|
|||
type RecordType = type value
|
||||
w.key.add ""
|
||||
value.enumInstanceSerializedFields(fieldName, field):
|
||||
type FieldType = type field
|
||||
w.key[^1] = fieldName
|
||||
w.writeFieldIMPL(FieldTag[RecordType, fieldName, FieldType], field, value)
|
||||
w.writeFieldIMPL(FieldTag[RecordType, fieldName], field, value)
|
||||
discard w.key.pop()
|
||||
else:
|
||||
const typeName = typetraits.name(value.type)
|
||||
|
|
Loading…
Reference in New Issue