diff options
author | Clyybber <darkmine956@gmail.com> | 2021-06-28 22:01:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-28 22:01:06 +0200 |
commit | 808db3b2845dab9822bc82ae80073a68396db999 (patch) | |
tree | 4cb8cf277bf20dee62473cab96db1cc9e8d3580b | |
parent | dd2cbe3164e476dafda4b59d6ed518d79f69f195 (diff) | |
download | Nim-808db3b2845dab9822bc82ae80073a68396db999.tar.gz |
Fix unused warning for $ on empty object (#18381)
-rw-r--r-- | lib/system/dollars.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/dollars.nim b/lib/system/dollars.nim index c23ea347d..baae8f090 100644 --- a/lib/system/dollars.nim +++ b/lib/system/dollars.nim @@ -113,7 +113,7 @@ proc `$`*[T: tuple|object](x: T): string = ## $() == "()" result = "(" const isNamed = T is object or isNamedTuple(T) - var count = 0 + var count {.used.} = 0 for name, value in fieldPairs(x): if count > 0: result.add(", ") when isNamed: |