File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -120,17 +120,9 @@ IteratorSize(::Type{Reverse{T}}) where {T} = IteratorSize(T)
120
120
IteratorEltype (:: Type{Reverse{T}} ) where {T} = IteratorEltype (T)
121
121
last (r:: Reverse ) = first (r. itr) # the first shall be last
122
122
123
- # reverse-order array iterators: assumes more-specialized Reverse for eachindex
124
- @propagate_inbounds function iterate (A:: Reverse{<:AbstractArray} , state= (reverse (eachindex (A. itr)),))
125
- y = iterate (state... )
126
- y === nothing && return y
127
- idx, itrs = y
128
- (A. itr[idx], (state[1 ], itrs))
129
- end
130
-
131
123
# Fallback method of `iterate(::Reverse{T})` which assumes the collection has `getindex(::T) and `reverse(eachindex(::T))`
132
124
# don't propagate inbounds for this just in case
133
- function iterate (A:: Reverse , state= (reverse (eachindex (A. itr)),))
125
+ @propagate_inbounds function iterate (A:: Reverse , state= (reverse (eachindex (A. itr)),))
134
126
y = iterate (state... )
135
127
y === nothing && return y
136
128
idx, itrs = y
You can’t perform that action at this time.
0 commit comments