Skip to content

Commit

Permalink
donh't capture block
Browse files Browse the repository at this point in the history
  • Loading branch information
konovod committed Apr 18, 2023
1 parent 2f24db3 commit e3ebfed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simplepool.cr
Expand Up @@ -58,10 +58,10 @@ class SimplePool(T)
end

# Yield a block with object from a pool. Object will be automatatically returned to the pool after block completion
def use(&block : (T) -> U) : U forall U
def use(& : (T) -> U) : U forall U
object = get
begin
block.call(object)
yield(object)
ensure
self.return(object)
end
Expand Down

0 comments on commit e3ebfed

Please sign in to comment.