From 7da158687b86640da42639845f7144ac53b15c87 Mon Sep 17 00:00:00 2001 From: Mildred Ki'Lya Date: Sat, 5 Aug 2023 23:26:19 +0200 Subject: [PATCH] Nim 2.0.0 compatibility (#21) --- jwt/private/utils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwt/private/utils.nim b/jwt/private/utils.nim index 6d255ab..c76ef5d 100644 --- a/jwt/private/utils.nim +++ b/jwt/private/utils.nim @@ -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="")