Skip to content

Commit

Permalink
Remove lent annotation (failing at compiletime)
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed May 21, 2020
1 parent fc87a08 commit 0964462
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pure/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ proc isNone*[T](self: Option[T]): bool {.inline.} =
else:
not self.has

proc get*[T](self: Option[T]): lent T {.inline.} =
proc get*[T](self: Option[T]): T {.inline.} =
## Returns contents of an `Option`. If it is `None`, then an exception is
## thrown.
##
Expand Down Expand Up @@ -363,7 +363,7 @@ proc `$`*[T](self: Option[T]): string =
else:
result = "None[" & name(T) & "]"

proc unsafeGet*[T](self: Option[T]): lent T {.inline.}=
proc unsafeGet*[T](self: Option[T]): T {.inline.}=
## Returns the value of a `some`. Behavior is undefined for `none`.
##
## **Note:** Use it only when you are **absolutely sure** the value is present
Expand Down

0 comments on commit 0964462

Please sign in to comment.