mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-03-30 16:13:08 +00:00
fix: parse config using int for NBytes instead of string (#1344)
This commit is contained in:
parent
4006b0024b
commit
5a227dbb56
@ -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