Improved collection-to-string behavior (#6825)
This commit is contained in:
parent
bc1123536e
commit
6df6ec27ec
33 changed files with 226 additions and 74 deletions
|
|
@ -141,8 +141,8 @@ proc excl*[T](c: var CritBitTree[T], key: string) =
|
|||
|
||||
proc missingOrExcl*[T](c: var CritBitTree[T], key: string): bool =
|
||||
## Returns true iff `c` does not contain the given `key`. If the key
|
||||
## does exist, c.excl(key) is performed.
|
||||
let oldCount = c.count
|
||||
## does exist, c.excl(key) is performed.
|
||||
let oldCount = c.count
|
||||
var n = exclImpl(c, key)
|
||||
result = c.count == oldCount
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ proc `$`*[T](c: CritBitTree[T]): string =
|
|||
result.add($key)
|
||||
when T isnot void:
|
||||
result.add(": ")
|
||||
result.add($val)
|
||||
result.addQuoted(val)
|
||||
result.add("}")
|
||||
|
||||
when isMainModule:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue