mirror of
https://github.com/logos-storage/questionable.git
synced 2026-02-02 21:13:08 +00:00
Fix CI
This commit is contained in:
parent
ba353b27e4
commit
8fbf39a60f
@ -101,7 +101,7 @@ template `|?`*[T,E](value: Result[T,E], fallback: T): T =
|
|||||||
|
|
||||||
template unpack*(expression: Result): untyped =
|
template unpack*(expression: Result): untyped =
|
||||||
let res = expression
|
let res = expression
|
||||||
when declaredInScope(internalWithoutError):
|
when declared(internalWithoutError):
|
||||||
if res.isFailure:
|
if res.isFailure:
|
||||||
internalWithoutError = res.error
|
internalWithoutError = res.error
|
||||||
unpack(res.option)
|
unpack(res.option)
|
||||||
|
|||||||
@ -25,7 +25,7 @@ template without*(condition, errorname, body) =
|
|||||||
var internalWithoutError {.inject.}: ref CatchableError
|
var internalWithoutError {.inject.}: ref CatchableError
|
||||||
else:
|
else:
|
||||||
internalWithoutError = nil
|
internalWithoutError = nil
|
||||||
|
|
||||||
without condition:
|
without condition:
|
||||||
template errorname: ref CatchableError = internalWithoutError
|
template errorname: ref CatchableError = internalWithoutError
|
||||||
if isNil(errorname):
|
if isNil(errorname):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user