Bump nim to 1.6.16
This commit is contained in:
parent
b692737eed
commit
0d1ca4b2cd
|
@ -13,7 +13,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
cache_nonce: [ 1 ]
|
cache_nonce: [ 1 ]
|
||||||
nim_version: [ 1.6.14 ]
|
nim_version: [ 1.6.16 ]
|
||||||
platform:
|
platform:
|
||||||
- {
|
- {
|
||||||
icon: 🐧,
|
icon: 🐧,
|
||||||
|
|
|
@ -31,7 +31,7 @@ proc defaultModifyGetImpl*(
|
||||||
aux: seq[byte]
|
aux: seq[byte]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
(maybeNewData, aux) = (awaitne fn(maybeCurrentData)).read()
|
(maybeNewData, aux) = await fn(maybeCurrentData)
|
||||||
except CatchableError as err:
|
except CatchableError as err:
|
||||||
return failure(err)
|
return failure(err)
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ method modifyGet*(self: SQLiteDatastore, key: Key, fn: ModifyGet): Future[?!seq[
|
||||||
var maybeNewData: ?seq[byte]
|
var maybeNewData: ?seq[byte]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
(maybeNewData, aux) = (awaitne fn(maybeCurrentData)).read()
|
(maybeNewData, aux) = await fn(maybeCurrentData)
|
||||||
except CatchableError as err:
|
except CatchableError as err:
|
||||||
return failure(err)
|
return failure(err)
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,12 @@ proc modifyTests*(
|
||||||
|
|
||||||
let processCount = 100
|
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)
|
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.} =
|
proc incAsyncFn(maybeBytes: ?seq[byte]): Future[?seq[byte]] {.async.} =
|
||||||
await sleepAsync(2.millis) # allows interleaving
|
await sleepAsync(2.millis) # allows interleaving
|
||||||
|
|
Loading…
Reference in New Issue