Skip to content

Commit

Permalink
allow vcat on single ChainedVector
Browse files Browse the repository at this point in the history
Formerly, `vcat(a::ChainedVector)` would fail with an error.
  • Loading branch information
stuartthomas25 authored Mar 19, 2024
1 parent fa840f9 commit 132495d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/chainedvector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ Base.@propagate_inbounds function Base.insert!(A::ChainedVector{T, AT}, i::Integ
return A
end

Base.vcat(A::ChainedVector{T, AT}) where {T, AT <: AbstractVector{T}} = A

Check warning on line 632 in src/chainedvector.jl

View check run for this annotation

Codecov / codecov/patch

src/chainedvector.jl#L632

Added line #L632 was not covered by tests

function Base.vcat(A::ChainedVector{T, AT}, arrays::ChainedVector{T, AT}...) where {T, AT <: AbstractVector{T}}
newarrays = vcat(A.arrays, map(x->x.arrays, arrays)...)
n = length(A.inds)
Expand Down

0 comments on commit 132495d

Please sign in to comment.