mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-02 13:53:11 +00:00
Fix warning in Nim 1.2.6
This commit is contained in:
parent
1b47843012
commit
fe8acac2cd
@ -34,7 +34,7 @@ template `=?`*[T](name: untyped{nkIdent}, option: ?T): bool =
|
||||
template liftPrefix(_: type Option, operator: untyped) =
|
||||
|
||||
template `operator`*(a: ?typed): ?typed =
|
||||
type T = type(`operator`(a.unsafeGet))
|
||||
type T {.used.} = type(`operator`(a.unsafeGet))
|
||||
if x =? a:
|
||||
`operator`(x).some
|
||||
else:
|
||||
|
||||
@ -37,7 +37,7 @@ template `=?`*[T](name: untyped{nkIdent}, value: ?!T): bool =
|
||||
template liftPrefix(_: type Result, operator: untyped) =
|
||||
|
||||
template `operator`*(a: ?!typed): ?!typed =
|
||||
type T = type(`operator`(a.unsafeGet))
|
||||
type T {.used.} = type(`operator`(a.unsafeGet))
|
||||
if x =? a:
|
||||
`operator`(x).success
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user