Improved collection-to-string behavior (#6825)

This commit is contained in:
Fabian Keller 2017-12-14 14:02:13 +01:00 • committed by Andreas Rumpf
commit 6df6ec27ec
33 changed files with 226 additions and 74 deletions

View file

@ -406,7 +406,7 @@ template dollarImpl() {.dirty.} =
result = "{"
for key in items(s):
if result.len > 1: result.add(", ")
result.add($key)
result.addQuoted(key)
result.add("}")
proc `$`*[A](s: HashSet[A]): string =