remove unnecessary side-effects from base64.encode(mime) (#22986)

Fixes https://github.com/nim-lang/Nim/issues/22985
This commit is contained in:
tersec
2023-11-25 19:52:42 +00:00
committed by GitHub
parent 379299a5ac
commit 26f2ea149c
2 changed files with 8 additions and 12 deletions

View File

@@ -53,5 +53,9 @@ template main() =
doAssert encode("", safe = true) == ""
doAssert encode("the quick brown dog jumps over the lazy fox", safe = true) == "dGhlIHF1aWNrIGJyb3duIGRvZyBqdW1wcyBvdmVyIHRoZSBsYXp5IGZveA=="
func mainNoSideEffects() = main()
static: main()
main()
static: mainNoSideEffects()
mainNoSideEffects()