Improved collection-to-string behavior (#6825)
This commit is contained in:
parent
bc1123536e
commit
6df6ec27ec
33 changed files with 226 additions and 74 deletions
|
|
@ -338,9 +338,9 @@ template dollarImpl(): untyped {.dirty.} =
|
|||
result = "{"
|
||||
for key, val in pairs(t):
|
||||
if result.len > 1: result.add(", ")
|
||||
result.add($key)
|
||||
result.addQuoted(key)
|
||||
result.add(": ")
|
||||
result.add($val)
|
||||
result.addQuoted(val)
|
||||
result.add("}")
|
||||
|
||||
proc `$`*[A, B](t: Table[A, B]): string =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue