Skip to content

Commit fa3ffc2

Browse files
committed
Use for type stability
1 parent 0960934 commit fa3ffc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/array_partition.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ function Base.copyto!(A::ArrayPartition, src::ArrayPartition)
210210
end
211211

212212
function Base.fill!(A::ArrayPartition, x)
213-
for i in eachindex(A.x)
214-
fill!(A.x[i], x)
213+
unrolled_foreach!(A.x) do x_
214+
fill!(x_, x)
215215
end
216216
A
217217
end
@@ -221,7 +221,7 @@ function recursivefill!(b::ArrayPartition, a::T2) where {T2 <: Union{Number, Boo
221221
fill!(x, a)
222222
end
223223
end
224-
224+
225225
## indexing
226226

227227
# Interface for the linear indexing. This is just a view of the underlying nested structure

0 commit comments

Comments
 (0)