Minor patch for far future proofing

This commit is contained in:
Mythical Forest Collective 2023-09-03 04:52:43 +01:00
parent 37420ad406
commit 7e5474c575
2 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,6 @@
# Package
version = "0.2.0"
version = "0.2.1"
author = "Yu Vitaqua fer Chronos"
description = "An implementation of ULID!"
license = "CC0"

View file

@ -106,4 +106,7 @@ proc parseNulid*(ulidStr: string): NULID =
result.randomness = UInt128.decode(ulidStr[10..25])
proc `$`*(ulid: NULID): string =
result = '0' & Int128.encode(ulid.toInt128(), 26)
result = Int128.encode(ulid.toInt128(), 26)
if result.len < 26:
result.insert("0")