avoid re-exporting options from std/wrapnils (#18222)

This commit is contained in:
Timothee Cour
2021-06-09 22:00:34 -07:00
committed by GitHub
parent 19918ceb2b
commit 79ded694d7
2 changed files with 2 additions and 1 deletions

View File

@@ -25,7 +25,6 @@ runnableExamples:
assert (?.f2.x2.x2).x3 == nil # this terminates ?. early
from options import Option, isSome, get, option, unsafeGet, UnpackDefect
export options.get, options.isSome, options.isNone
template fakeDot*(a: Option, b): untyped =
## See top-level example.
@@ -90,6 +89,7 @@ macro `?.`*(a: untyped): auto =
macro `??.`*(a: untyped): Option =
## Same as `?.` but returns an `Option`.
runnableExamples:
import std/options
type Foo = ref object
x1: ref int
x2: int

View File

@@ -1,4 +1,5 @@
import std/wrapnils
from std/options import get, isSome
proc checkNotZero(x: float): float =
doAssert x != 0