This commit is contained in:
Jacek Sieka 2022-01-13 22:21:46 +01:00
parent 9d0f1167ca
commit b464505b4d
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
1 changed files with 1 additions and 0 deletions

View File

@ -722,6 +722,7 @@ template `[]`*[T: not void, E](self: Result[T, E]): T =
template `[]`*[E](self: Result[void, E]) =
## Fetch value of result if set, or raise Defect
## Exception bridge mode: raise given Exception instead
self.get()
template `[]`*[T: not void, E](self: var Result[T, E]): var T =
## Fetch value of result if set, or raise Defect