We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
new
1 parent fe0f06d commit 349bb58Copy full SHA for 349bb58
src/PreallocationTools.jl
@@ -83,7 +83,7 @@ allocated as needed and then cached within `b` for subsequent usage.
83
struct LazyBufferCache{F<:Function}
84
bufs::Dict # a dictionary mapping types to buffers
85
lengthmap::F
86
- LazyBufferCache(f::F=identity) where {F<:Function} = new{F}(Dict()) # start with empty dict
+ LazyBufferCache(f::F=identity) where {F<:Function} = new{F}(Dict(), f) # start with empty dict
87
end
88
89
# override the [] method
0 commit comments