Fix for `$`(0).

This commit is contained in:
cheatfate 2019-03-27 07:54:41 +02:00
parent 3d87707b07
commit a2b85a8126
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
1 changed files with 1 additions and 2 deletions

View File

@ -400,8 +400,7 @@ func `$`*(a: Duration): string {.inline.} =
if v >= Microsecond.value:
result &= $(v div Microsecond.value) & "us"
v = v mod Microsecond.value
if v >= Nanosecond.value:
result &= $(v div Nanosecond.value) & "ns"
result &= $(v div Nanosecond.value) & "ns"
func `$`*(a: Moment): string {.inline.} =
## Returns string representation of Moment ``a`` as nanoseconds value.