changes $ for seqs to never produce 'nil'
This commit is contained in:
parent
887987bb1a
commit
b2d5bfd076
1 changed files with 1 additions and 4 deletions
|
|
@ -2530,10 +2530,7 @@ proc `$`*[T](x: seq[T]): string =
|
||||||
##
|
##
|
||||||
## .. code-block:: nim
|
## .. code-block:: nim
|
||||||
## $(@[23, 45]) == "@[23, 45]"
|
## $(@[23, 45]) == "@[23, 45]"
|
||||||
if x.isNil:
|
collectionToString(x, "@[", ", ", "]")
|
||||||
"nil"
|
|
||||||
else:
|
|
||||||
collectionToString(x, "@[", ", ", "]")
|
|
||||||
|
|
||||||
# ----------------- GC interface ---------------------------------------------
|
# ----------------- GC interface ---------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue