From 808099f2a16bdadff62530e308efaa11dd10f076 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Tue, 19 Dec 2023 12:28:00 +1100 Subject: [PATCH] Shorten logutils.formatIt for `NBytes` Both json and textlines formatIt were not needed, and could be combined into one formatIt --- codex/units.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codex/units.nim b/codex/units.nim index d254712da..57b52ed66 100644 --- a/codex/units.nim +++ b/codex/units.nim @@ -42,8 +42,7 @@ divMaths(NBytes) proc `$`*(ts: NBytes): string = $(int(ts)) & "'NByte" proc `'nb`*(n: string): NBytes = parseInt(n).NBytes -logutils.formatIt(LogFormat.textLines, NBytes): $it -logutils.formatIt(LogFormat.json, NBytes): $it +logutils.formatIt(NBytes): $it const MiB = 1024.NBytes * 1024.NBytes # ByteSz, 1 mebibyte = 1,048,576 ByteSz