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)
|
||||
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
|
||||
## Exception bridge mode: raise given Exception instead
|
||||
mixin get
|
||||
|
|
Loading…
Reference in New Issue