mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-09 11:45:42 +00:00
results: fix non-void [] overload
This commit is contained in:
parent
df7f2e7ed5
commit
8065e36c5a
@ -453,7 +453,7 @@ func get*[T, E](self: var Result[T, E]): var T {.inline.} =
|
|||||||
assertOk(self)
|
assertOk(self)
|
||||||
self.v
|
self.v
|
||||||
|
|
||||||
template `[]`*[T, E](self: Result[T, E]): T =
|
template `[]`*[T: not void, E](self: Result[T, E]): T =
|
||||||
## Fetch value of result if set, or raise Defect
|
## Fetch value of result if set, or raise Defect
|
||||||
## Exception bridge mode: raise given Exception instead
|
## Exception bridge mode: raise given Exception instead
|
||||||
mixin get
|
mixin get
|
||||||
|
Loading…
x
Reference in New Issue
Block a user