Fix unused warning for $ on empty object (#18381)
This commit is contained in:
parent
dd2cbe3164
commit
808db3b284
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue