mirror of
https://github.com/logos-storage/questionable.git
synced 2026-02-07 07:23:10 +00:00
Other cleanup
This commit is contained in:
parent
f4ada730b8
commit
b4bed3ff52
@ -1,7 +1,7 @@
|
|||||||
import std/options
|
import std/options
|
||||||
import std/macros
|
import std/macros
|
||||||
|
|
||||||
template questionableUnpack*(expression: Option): untyped =
|
template questionableUnpack*[T](expression: Option[T]): (T, bool) =
|
||||||
## Used internally
|
## Used internally
|
||||||
|
|
||||||
let option = expression
|
let option = expression
|
||||||
|
|||||||
@ -110,7 +110,7 @@ proc option*[T,E](value: Result[T,E]): ?T =
|
|||||||
else:
|
else:
|
||||||
T.none
|
T.none
|
||||||
|
|
||||||
template questionableUnpack*(expression: Result): untyped =
|
template questionableUnpack*[T, E](expression: Result[T, E]): (T, bool) =
|
||||||
## Used internally
|
## Used internally
|
||||||
|
|
||||||
let res = expression
|
let res = expression
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user