From 5eeafbf55029816e5022d9d6aa9ed3b0acf2d3ba Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sat, 30 Sep 2023 12:27:27 +0800 Subject: fixes #22696; func `strutils.join` for non-strings uses proc `$` which can have side effects (#22770) fixes #22696 partially revert https://github.com/nim-lang/Nim/pull/16281 `join` calls `$` interally, which might introduce a sideeffect call. --- lib/pure/strutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 7ab3d37c8..5e41705a7 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -1875,7 +1875,7 @@ func join*(a: openArray[string], sep: string = ""): string {.rtl, else: result = "" -func join*[T: not string](a: openArray[T], sep: string = ""): string = +proc join*[T: not string](a: openArray[T], sep: string = ""): string = ## Converts all elements in the container `a` to strings using `$`, ## and concatenates them with `sep`. runnableExamples: -- cgit 1.4.1-2-gfad0