FieldTag no longer requires specifying the FieldType

This commit is contained in:
Zahary Karadjov 2022-06-18 13:30:42 +03:00
parent fc03a0c4e1
commit 5d0d864510
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
2 changed files with 2 additions and 4 deletions

View File

@ -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:

View File

@ -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)