From 8fbf39a60ff8eb7b49a154e4189dd62076f769f5 Mon Sep 17 00:00:00 2001 From: Tanguy Date: Thu, 16 Jun 2022 18:09:50 +0200 Subject: [PATCH] Fix CI --- questionable/results.nim | 2 +- questionable/withoutresult.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/questionable/results.nim b/questionable/results.nim index eefa75b..1e9e977 100644 --- a/questionable/results.nim +++ b/questionable/results.nim @@ -101,7 +101,7 @@ template `|?`*[T,E](value: Result[T,E], fallback: T): T = template unpack*(expression: Result): untyped = let res = expression - when declaredInScope(internalWithoutError): + when declared(internalWithoutError): if res.isFailure: internalWithoutError = res.error unpack(res.option) diff --git a/questionable/withoutresult.nim b/questionable/withoutresult.nim index 6109925..fca4dee 100644 --- a/questionable/withoutresult.nim +++ b/questionable/withoutresult.nim @@ -25,7 +25,7 @@ template without*(condition, errorname, body) = var internalWithoutError {.inject.}: ref CatchableError else: internalWithoutError = nil - + without condition: template errorname: ref CatchableError = internalWithoutError if isNil(errorname):