Change error handling in split to use doAssert so it is not compiled out when running tests
This commit is contained in:
parent
af63bd4e0b
commit
7ad32ea0ed
1 changed files with 1 additions and 1 deletions
|
|
@ -808,7 +808,7 @@ proc split*(s: string, sep: string, maxsplit: int = -1): seq[string] {.noSideEff
|
||||||
##
|
##
|
||||||
## Substrings are separated by the string `sep`. This is a wrapper around the
|
## Substrings are separated by the string `sep`. This is a wrapper around the
|
||||||
## `split iterator <#split.i,string,string>`_.
|
## `split iterator <#split.i,string,string>`_.
|
||||||
assert(sep.len > 0)
|
doAssert(sep.len > 0)
|
||||||
|
|
||||||
accumulateResult(split(s, sep, maxsplit))
|
accumulateResult(split(s, sep, maxsplit))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue