diff --git a/src/FixedSizeArrays.jl b/src/FixedSizeArrays.jl index 440d91b..44d97b1 100644 --- a/src/FixedSizeArrays.jl +++ b/src/FixedSizeArrays.jl @@ -1,6 +1,14 @@ module FixedSizeArrays include("FixedSizeArray.jl") + +if isdefined(Base, :dataids) && (Base.dataids isa Function) + # This is an internal, non-public function which is nevertheless needed to + # get good performance in some cases (e.g. broadcasting): + # . + Base.dataids(a::FixedSizeArray) = Base.dataids(a.mem) +end + include("collect_as.jl") end # module FixedSizeArrays diff --git a/src/collect_as.jl b/src/collect_as.jl index 252b64d..d3acb0f 100644 --- a/src/collect_as.jl +++ b/src/collect_as.jl @@ -115,10 +115,3 @@ function collect_as(::Type{T}, iterator) where {T<:FixedSizeArray} len_stat = length_status(size_class) collect_as_fsa_checked(iterator, spec, dim_count, len_stat)::T end - -if isdefined(Base, :dataids) && (Base.dataids isa Function) - # This is an internal, non-public function which is nevertheless needed to - # get good performance in some cases (e.g. broadcasting): - # . - Base.dataids(a::FixedSizeArray) = Base.dataids(a.mem) -end