Skip to content

Commit da410ca

Browse files
tweak types
1 parent 6fd05e6 commit da410ca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/CircularArrayBuffers.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,14 @@ function Base.push!(cb::CircularArrayBuffer{T,N}, data) where {T,N}
137137
return cb
138138
end
139139

140-
function Base.push!(cb::CircularArrayBuffer{T,1}, data) where {T}
140+
function Base.push!(cb::CircularVectorBuffer{T}, data) where {T}
141141
_update_first_and_nframes!(cb)
142142
i = _buffer_frame(cb, cb.nframes)
143143
cb.buffer[i:i] .= Ref(data)
144+
return cb
144145
end
145146

146-
function Base.append!(cb::CircularArrayBuffer{T,N}, data::D) where {T,N,D}
147+
function Base.append!(cb::CircularArrayBuffer{T,N}, data) where {T,N}
147148
d, r = divrem(length(data), cb.step_size)
148149
@assert r == 0
149150
if length(data) >= length(cb.buffer)
@@ -185,7 +186,7 @@ function Base.pop!(cb::CircularArrayBuffer{T,N}) where {T,N}
185186
else
186187
res = @views cb.buffer[ntuple(_ -> (:), N - 1)..., _buffer_frame(cb, cb.nframes)]
187188
cb.nframes -= 1
188-
res
189+
return res
189190
end
190191
end
191192

@@ -199,7 +200,7 @@ function Base.popfirst!(cb::CircularArrayBuffer{T,N}) where {T,N}
199200
if cb.first > capacity(cb)
200201
cb.first = 1
201202
end
202-
res
203+
return res
203204
end
204205
end
205206

0 commit comments

Comments
 (0)