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