Skip to content

Commit

Permalink
avoid creating a closure if there are no future vars
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Dec 22, 2024
1 parent 8b98077 commit 9708b7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pure/asyncmacro.nim
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type
template createCb(futTyp, strName, identName, futureVarCompletions: untyped) =
bind finished
{.push stackTrace: off.}
proc identName(fut: Future[futTyp], it: ClosureIt[futTyp]) {.closure, effectsOf: it.} =
proc identName(fut: Future[futTyp], it: ClosureIt[futTyp]) {.effectsOf: it.} =
try:
if not it.finished:
var next = it(fut)
Expand Down

0 comments on commit 9708b7c

Please sign in to comment.