Parse config using int for NBytes instead of string

This commit is contained in:
Arnaud 2025-11-11 05:58:33 +01:00
parent 553a184c98
commit 793e2982ba
No known key found for this signature in database
GPG Key ID: B8FBC178F10CA7AE

View File

@ -63,10 +63,7 @@ proc readValue*(r: var JsonReader, val: var ThreadCount) =
val = res.get()
proc readValue*(r: var JsonReader, val: var NBytes) =
let res = NBytes.parse(r.readValue(string))
if res.isErr:
raise newException(SerializationError, "Cannot parse the NBytes: " & res.error())
val = res.get()
val = NBytes(r.readValue(int))
proc readValue*(r: var JsonReader, val: var Duration) =
var dur: Duration