Skip to content

Commit 1c4cba0

Browse files
committed
Detect the ArraysOfArrays v1 API via isdefined instead of pkgversion
Created by generative AI.
1 parent aa44f2e commit 1c4cba0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/RNTuple/fieldcolumn_reading.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ function read_field(io, field::LeafField{Bool}, page_list)
147147
return res::_field_output_type(field)
148148
end
149149

150-
# ArraysOfArrays v1 adds the element type of VectorOfVectors as a fifth type parameter
151-
@static if pkgversion(ArraysOfArrays) >= v"1"
150+
# ArraysOfArrays v1 (which introduced PartsView) adds the element type of VectorOfVectors as a fifth type parameter
151+
@static if isdefined(ArraysOfArrays, :PartsView)
152152
_vov_type(::Type{VT}, ::Type{VI}) where {VT, VI} = VectorOfVectors{eltype(VT), VT, VI, Vector{Tuple{}}, Base.promote_op(view, VT, UnitRange{Int})}
153153
else
154154
_vov_type(::Type{VT}, ::Type{VI}) where {VT, VI} = VectorOfVectors{eltype(VT), VT, VI, Vector{Tuple{}}}

0 commit comments

Comments
 (0)