mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-03-21 03:33:15 +00:00
Parse config using int for NBytes instead of string
This commit is contained in:
parent
553a184c98
commit
793e2982ba
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user