Skip to content

Commit b6058cf

Browse files
committed
formatting
1 parent 16c93a4 commit b6058cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/circular_buffer.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
CircularBuffer{T}(v,n::Int)
2+
CircularBuffer{T}(v, n::Int)
33
44
The CircularBuffer type implements a circular buffer of fixed capacity
55
where new items are pushed to the back of the list, overwriting values
@@ -25,18 +25,18 @@ mutable struct CircularBuffer{T} <: AbstractVector{T}
2525
end
2626

2727
function CircularBuffer{T}(iter, capacity::Integer) where {T}
28-
vec = copyto!(Vector{T}(undef,capacity), iter)
29-
CircularBuffer{T}(1, length(iter),vec)
28+
vec = copyto!(Vector{T}(undef, capacity), iter)
29+
CircularBuffer{T}(1, length(iter), vec)
3030
end
3131

3232
CircularBuffer(capacity::Integer) = CircularBuffer{Any}(capacity)
3333

34-
CircularBuffer{T}(capacity::Integer) where {T} = CircularBuffer{T}(T[],capacity)
34+
CircularBuffer{T}(capacity::Integer) where {T} = CircularBuffer{T}(T[], capacity)
3535

36-
CircularBuffer(iter,capacity::Integer) = CircularBuffer{eltype(iter)}(iter,capacity)
36+
CircularBuffer(iter, capacity::Integer) = CircularBuffer{eltype(iter)}(iter, capacity)
3737

3838
function CircularBuffer{T}(iter) where {T}
39-
vec = reshape(collect(T,iter),:)
39+
vec = reshape(collect(T, iter), :)
4040
CircularBuffer{T}(1, length(vec), vec)
4141
end
4242

0 commit comments

Comments
 (0)