diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e2e106..8221127 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: cache_nonce: [ 1 ] - nim_version: [ 1.6.14 ] + nim_version: [ 1.6.16 ] platform: - { icon: 🐧, diff --git a/datastore/defaultimpl.nim b/datastore/defaultimpl.nim index 4d6ed3e..05f1661 100644 --- a/datastore/defaultimpl.nim +++ b/datastore/defaultimpl.nim @@ -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) diff --git a/datastore/sql/sqliteds.nim b/datastore/sql/sqliteds.nim index fee0feb..ff440e4 100644 --- a/datastore/sql/sqliteds.nim +++ b/datastore/sql/sqliteds.nim @@ -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) diff --git a/tests/datastore/modifycommontests.nim b/tests/datastore/modifycommontests.nim index be7fd43..1a38514 100644 --- a/tests/datastore/modifycommontests.nim +++ b/tests/datastore/modifycommontests.nim @@ -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