Nim 2.0.0 compatibility (#21)

This commit is contained in:
Mildred Ki'Lya
2023-08-05 23:26:19 +02:00
committed by GitHub
parent 5ab3fe5a3b
commit 7da158687b

View File

@@ -15,7 +15,7 @@ proc checkKeysExists*(node: JsonNode, keys: varargs[string]) =
raise newException(KeyError, "$# is not present." % key)
proc encodeUrlSafe*(s: openarray[byte]): string =
when NimMajor >= 1 and (NimMinor >= 1 or NimPatch >= 2):
when (NimMajor >= 1 and (NimMinor >= 1 or NimPatch >= 2)) or NimMajor >= 2:
result = base64.encode(s)
else:
result = base64.encode(s, newLine="")