Skip to content

Commit

Permalink
Shorten logutils.formatIt for NBytes
Browse files Browse the repository at this point in the history
Both json and textlines formatIt were not needed, and could be combined into one formatIt
  • Loading branch information
emizzle committed Dec 19, 2023
1 parent 63b0d59 commit 808099f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions codex/units.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 808099f

Please sign in to comment.