Skip to content

Commit 10434f3

Browse files
authored
move the dataids method to the main file (#80)
I think this may be tidier. The `FixedSizeBitArray` method would presumably go right next to this one.
1 parent 66bdda0 commit 10434f3

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/FixedSizeArrays.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
module FixedSizeArrays
22

33
include("FixedSizeArray.jl")
4+
5+
if isdefined(Base, :dataids) && (Base.dataids isa Function)
6+
# This is an internal, non-public function which is nevertheless needed to
7+
# get good performance in some cases (e.g. broadcasting):
8+
# <https://github.com/JuliaArrays/FixedSizeArrays.jl/issues/63>.
9+
Base.dataids(a::FixedSizeArray) = Base.dataids(a.mem)
10+
end
11+
412
include("collect_as.jl")
513

614
end # module FixedSizeArrays

src/collect_as.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,3 @@ function collect_as(::Type{T}, iterator) where {T<:FixedSizeArray}
115115
len_stat = length_status(size_class)
116116
collect_as_fsa_checked(iterator, spec, dim_count, len_stat)::T
117117
end
118-
119-
if isdefined(Base, :dataids) && (Base.dataids isa Function)
120-
# This is an internal, non-public function which is nevertheless needed to
121-
# get good performance in some cases (e.g. broadcasting):
122-
# <https://github.com/JuliaArrays/FixedSizeArrays.jl/issues/63>.
123-
Base.dataids(a::FixedSizeArray) = Base.dataids(a.mem)
124-
end

0 commit comments

Comments
 (0)