mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-02 13:53:11 +00:00
Fix deprecation warning when importing errorban inside the library
`errorban` module [has been deprecated][deprecation] since v0.5.0. The library continued to use it internally, but because of that, it was triggering its own deprecation warning. This commit splits `errorban.nim` into two pieces: the warning and actual code. [deprecation]: https://github.com/status-im/questionable/commit/e66cd2439b
This commit is contained in:
parent
6018fd43e0
commit
361948499b
@ -1,10 +1,3 @@
|
||||
{.warning: "errorban is deprecated; use nimble package `upraises` instead".}
|
||||
|
||||
## Include this file to indicate that your module does not raise Errors.
|
||||
## Disables compiler hints about unused declarations in Nim < 1.4.0
|
||||
|
||||
when (NimMajor, NimMinor, NimPatch) >= (1, 4, 0):
|
||||
{.push raises:[].}
|
||||
else:
|
||||
{.push raises: [Defect].}
|
||||
{.hint[XDeclaredButNotUsed]: off.}
|
||||
include ./private/errorban
|
||||
|
||||
@ -6,7 +6,7 @@ import ./indexing
|
||||
import ./operators
|
||||
import ./without
|
||||
|
||||
include ./errorban
|
||||
include ./private/errorban
|
||||
|
||||
export options except get
|
||||
export binding
|
||||
|
||||
8
questionable/private/errorban.nim
Normal file
8
questionable/private/errorban.nim
Normal file
@ -0,0 +1,8 @@
|
||||
## Include this file to indicate that your module does not raise Errors.
|
||||
## Disables compiler hints about unused declarations in Nim < 1.4.0
|
||||
|
||||
when (NimMajor, NimMinor, NimPatch) >= (1, 4, 0):
|
||||
{.push raises:[].}
|
||||
else:
|
||||
{.push raises: [Defect].}
|
||||
{.hint[XDeclaredButNotUsed]: off.}
|
||||
@ -8,7 +8,7 @@ import ./operators
|
||||
import ./without
|
||||
import ./withoutresult
|
||||
|
||||
include ./errorban
|
||||
include ./private/errorban
|
||||
|
||||
export resultsbase except ok, err, isOk, isErr, get
|
||||
export binding
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user