Change error handling in split to use doAssert so it is not compiled out when running tests

This commit is contained in:
Chris Heller
2016-12-21 22:24:08 -08:00
parent af63bd4e0b
commit 7ad32ea0ed

View File

@@ -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
## `split iterator <#split.i,string,string>`_.
assert(sep.len > 0)
doAssert(sep.len > 0)
accumulateResult(split(s, sep, maxsplit))