deprecate accumulateResult => sequtils.toSeq (#8666)

This commit is contained in:
Timothee Cour 2018-10-13 00:23:33 -07:00 • committed by Andreas Rumpf
commit ef820769a4

View file

@ -2754,8 +2754,11 @@ when not defined(nimscript) and hasAlloc:
{.warning: "GC_getStatistics is a no-op in JavaScript".} {.warning: "GC_getStatistics 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. ## helps to convert an iterator to a proc.
## See also `sequtils.toSeq` which is more hygienic and efficient.
##
## **Deprecated since v0.19.2:** use toSeq instead
result = @[] result = @[]
for x in iter: add(result, x) for x in iter: add(result, x)