Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit cf3c991

Browse files
authored
minor fix (#142)
1 parent 1c23c91 commit cf3c991

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/extensions/ElasticArrays.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using ElasticArrays
22

33
Base.push!(a::ElasticArray, x) = append!(a, x)
4+
Base.push!(a::ElasticArray{T,1}, x) where T = append!(a, [x])
45
Base.empty!(a::ElasticArray) = ElasticArrays.resize_lastdim!(a, 0)
56

67
function Base.pop!(a::ElasticArray)

src/utils/reservoir_array_buffer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Base.IndexStyle
2626
function Base.push!(b::ReservoirArrayBuffer{T,N}, x) where {T,N}
2727
b.n += 1
2828
if b.n <= b.capacity
29-
append!(b.buffer, x)
29+
push!(b.buffer, x)
3030
else
3131
i = rand(b.rng, 1:b.n)
3232
if i <= b.capacity

0 commit comments

Comments
 (0)