Remove useless statements

This commit is contained in:
Arnaud 2026-04-20 10:39:51 +04:00
parent 1435816dba
commit 3f07ed7169
No known key found for this signature in database
GPG Key ID: A6C7C781817146FA
2 changed files with 0 additions and 11 deletions

View File

@ -202,9 +202,6 @@ proc fromJson*[T: ref object or object](_: type T, json: JsonNode): ?!T =
of Strict:
if opts.key notin json:
return failure newSerdeError("object field missing in json: " & opts.key)
elif opts.ignore:
# unable to figure out a way to make this a compile time check
discard
of OptIn:
if not hasDeserializePragma:
skip = true
@ -215,8 +212,6 @@ proc fromJson*[T: ref object or object](_: type T, json: JsonNode): ?!T =
of OptOut:
if opts.ignore:
skip = true
elif hasDeserializePragma and opts.key == name:
discard
if not skip:
if isOptionalValue:

View File

@ -99,12 +99,6 @@ proc `%`*[T: object or ref object](obj: T): JsonNode =
of OptOut:
if opts.ignore:
skip = true
elif hasSerialize and opts.key == name: # all serialize params are default
discard
of Strict:
if opts.ignore:
# unable to figure out a way to make this a compile time check
discard
if not skip:
jsonObj[opts.key] = %value