summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-30 23:55:54 +0200
committerAraq <rumpf_a@web.de>2018-08-31 00:30:19 +0200
commitfab449872776badf7c81f08b29ddaf2f598a5c3d (patch)
treec1bc5617e70e18e1446ddcf7b2d4252daf9e2c18 /lib
parent6fd0a332659cb01c1074a9e0c6b2e443ec600f8d (diff)
downloadNim-fab449872776badf7c81f08b29ddaf2f598a5c3d.tar.gz
times.nim: minor code cleanup
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/times.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index 9f6ea5722..a7ccbf6ee 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -608,7 +608,6 @@ proc stringifyUnit(value: int | int64, unit: TimeUnit): string =
 
 proc humanizeParts(parts: seq[string]): string =
   ## Make date string parts human-readable
-
   result = ""
   if parts.len == 0:
     result.add "0 nanoseconds"
@@ -617,8 +616,8 @@ proc humanizeParts(parts: seq[string]): string =
   elif parts.len == 2:
     result = parts[0] & " and " & parts[1]
   else:
-    for part in parts[0..high(parts)-1]:
-      result.add part & ", "
+    for i in 0..high(parts)-1:
+      result.add parts[i] & ", "
     result.add "and " & parts[high(parts)]
 
 proc `$`*(dur: Duration): string =