avoid re-exporting options from std/wrapnils (#18222)
This commit is contained in:
parent
19918ceb2b
commit
79ded694d7
2 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import std/wrapnils
|
||||
from std/options import get, isSome
|
||||
|
||||
proc checkNotZero(x: float): float =
|
||||
doAssert x != 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue