mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
deprecate accumulateResult => sequtils.toSeq (#8666)
This commit is contained in:
committed by
Andreas Rumpf
parent
eb4272ba1c
commit
ef820769a4
@@ -2754,8 +2754,11 @@ when not defined(nimscript) and hasAlloc:
|
||||
{.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.
|
||||
## See also `sequtils.toSeq` which is more hygienic and efficient.
|
||||
##
|
||||
## **Deprecated since v0.19.2:** use toSeq instead
|
||||
result = @[]
|
||||
for x in iter: add(result, x)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user