Bump nim to 1.6.16

This commit is contained in:
Tomasz Bekas 2023-12-20 15:21:26 +01:00
parent b692737eed
commit 0d1ca4b2cd
No known key found for this signature in database
GPG Key ID: 4854E04C98824959
4 changed files with 6 additions and 7 deletions

View File

@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
cache_nonce: [ 1 ]
nim_version: [ 1.6.14 ]
nim_version: [ 1.6.16 ]
platform:
- {
icon: 🐧,

View File

@ -31,7 +31,7 @@ proc defaultModifyGetImpl*(
aux: seq[byte]
try:
(maybeNewData, aux) = (awaitne fn(maybeCurrentData)).read()
(maybeNewData, aux) = await fn(maybeCurrentData)
except CatchableError as err:
return failure(err)

View File

@ -52,7 +52,7 @@ method modifyGet*(self: SQLiteDatastore, key: Key, fn: ModifyGet): Future[?!seq[
var maybeNewData: ?seq[byte]
try:
(maybeNewData, aux) = (awaitne fn(maybeCurrentData)).read()
(maybeNewData, aux) = await fn(maybeCurrentData)
except CatchableError as err:
return failure(err)

View File

@ -21,13 +21,12 @@ proc modifyTests*(
let processCount = 100
proc withRandDelay(op: Future[?!void]): Future[void] {.async.} =
proc withRandDelay(op: Future[?!void]): Future[void] {.async: (raises: [Exception]).} =
await sleepAsync(rand(processCount).millis)
discard (await op)
# let errMsg = (await op).errorOption.map((err) => err.msg)
let errMsg = (await op).errorOption.map((err) => err.msg)
# require none(string) == errMsg
require none(string) == errMsg
proc incAsyncFn(maybeBytes: ?seq[byte]): Future[?seq[byte]] {.async.} =
await sleepAsync(2.millis) # allows interleaving