Skip to content

Commit 689d7fe

Browse files
vtjnashrafaqz
authored andcommitted
Remove unnecessary use of length(::Stateful)
1 parent d1a9899 commit 689d7fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/iterator.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ end
4242
) where {T,I<:Tuple{A,B,C}} where {A,B,C}
4343
datacur::A, bi::B, bstate::C = i
4444
(chunkiter, innerinds) = bstate
45-
cistateold = length(chunkiter)
45+
cistateold = isdone(innerinds)
4646
biter = iterate(bi, bstate)
4747
if biter === nothing
4848
return nothing
4949
else
5050
innernow, bstatenew = biter
5151
(chunkiter, innerinds) = bstatenew
52-
if length(chunkiter) !== cistateold
52+
if cistateold
5353
curchunk = innerinds.itr.indices
5454
datacur = OffsetArray(a[curchunk...], innerinds.itr)
5555
return datacur[innernow]::T, (datacur, bi, bstatenew)::I

0 commit comments

Comments
 (0)