fix: parse config json using int for thread count (#1345)

This commit is contained in:
Arnaud 2025-11-14 07:46:06 +04:00 committed by GitHub
parent c80d44ff93
commit 2b9fc1eb55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View File

@ -156,7 +156,7 @@ task libcodexDynamic, "Generate bindings":
let name = "libcodex"
buildLibrary name, "library/", params, "dynamic"
task libcodextatic, "Generate bindings":
task libcodexStatic, "Generate bindings":
var params = ""
when compiles(commandLineParams):
for param in commandLineParams():

View File

@ -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))