Skip to content

Commit 967d92d

Browse files
authored
avoid warning on empty reader table (#99)
1 parent 12ada99 commit 967d92d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serialization/object_serialization.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ proc makeFieldReadersTable(RecordType, ReaderType: distinct type,
218218
numFields: static[int]):
219219
array[numFields, FieldReader[RecordType, ReaderType]] =
220220
mixin enumAllSerializedFields, readFieldIMPL, handleReadException
221-
var idx = 0
221+
var idx {.used.} = 0 # used in case there are no fields..
222222
223223
enumAllSerializedFields(RecordType):
224224
if fieldCaseDiscriminator != "":

0 commit comments

Comments
 (0)