From e441cd609e9de9d970752a64ba7f0357243382ba Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sun, 1 Jul 2018 21:27:22 -0700 Subject: [PATCH 1/3] accumulateResult: mention sequtils.toSeq --- lib/system.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/system.nim b/lib/system.nim index 9b00ff1452087..afaf733389a60 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2668,7 +2668,8 @@ when not defined(nimscript) and hasAlloc: "" template accumulateResult*(iter: untyped) = - ## helps to convert an iterator to a proc. + ## helps to convert an iterator to a proc. + ## See also `sequtils.toSeq` which is more hygienic and efficient. result = @[] for x in iter: add(result, x) From 2afae468750d64e80aebb119931551111333e90b Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 2 Jul 2018 16:31:21 -0700 Subject: [PATCH 2/3] Update system.nim --- lib/system.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system.nim b/lib/system.nim index afaf733389a60..3b586974b67bb 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2667,7 +2667,7 @@ when not defined(nimscript) and hasAlloc: {.warning: "GC_disableMarkAndSweep is a no-op in JavaScript".} "" -template accumulateResult*(iter: untyped) = +template accumulateResult*(iter: untyped) {.deprecated: "use `sequtils.toSeq` instead (more hygienic, sometimes more efficient)".} = ## helps to convert an iterator to a proc. ## See also `sequtils.toSeq` which is more hygienic and efficient. result = @[] From dd6c03c466fb4e22c4ea36de99e0ea10063bd4fe Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Tue, 3 Jul 2018 15:06:15 -0700 Subject: [PATCH 3/3] Update system.nim --- lib/system.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/system.nim b/lib/system.nim index 3b586974b67bb..60892dd94afcb 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2670,6 +2670,8 @@ when not defined(nimscript) and hasAlloc: template accumulateResult*(iter: untyped) {.deprecated: "use `sequtils.toSeq` instead (more hygienic, sometimes more efficient)".} = ## helps to convert an iterator to a proc. ## See also `sequtils.toSeq` which is more hygienic and efficient. + ## + ## **Deprecated since v0.19.0:** use toSeq instead result = @[] for x in iter: add(result, x)