mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-03 14:03:10 +00:00
fix: parse config using int for ThreadCount instead of using string
This commit is contained in:
parent
0d71e22054
commit
09551cf902
@ -56,11 +56,7 @@ proc readValue*(r: var JsonReader, val: var SignedPeerRecord) =
|
||||
val = res.get()
|
||||
|
||||
proc readValue*(r: var JsonReader, val: var ThreadCount) =
|
||||
let res = ThreadCount.parse(r.readValue(string))
|
||||
if res.isErr:
|
||||
raise
|
||||
newException(SerializationError, "Cannot parse the thread count: " & res.error())
|
||||
val = res.get()
|
||||
val = ThreadCount(r.readValue(int))
|
||||
|
||||
proc readValue*(r: var JsonReader, val: var NBytes) =
|
||||
val = NBytes(r.readValue(int))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user