mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-14 20:03:07 +00:00
git-subtree-dir: third-party/nwaku git-subtree-split: d94cb7c73631ffd4b934839ba58bc622d331a135
15 lines
433 B
Nim
15 lines
433 B
Nim
import chronos
|
|
|
|
template assertResultOk*[T, E](result: Result[T, E]) =
|
|
assert result.isOk(), $result.error()
|
|
|
|
template assertResultOk*(result: Result[void, string]) =
|
|
assert result.isOk(), $result.error()
|
|
|
|
template typeEq*(t: typedesc, u: typedesc): bool =
|
|
# <a is b> is also true if a is subtype of b
|
|
t is u and u is t # Only true if actually equal types
|
|
|
|
template typeEq*(t: auto, u: typedesc): bool =
|
|
typeEq(type(t), u)
|