From fab449872776badf7c81f08b29ddaf2f598a5c3d Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 30 Aug 2018 23:55:54 +0200 Subject: times.nim: minor code cleanup --- lib/pure/times.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') 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 = -- cgit 1.4.1-2-gfad0 sub'>This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log blame commit diff stats
path: root/tests/stdlib/tgetfileinfo.nim
blob: 1c897b7024e24d5260ec9a7898da4acf80ced9db (plain) (tree)
1
2