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
commit 79ded694d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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