Skip to content

Commit 995a046

Browse files
committed
fix: don't use isnothing to support Julia 1.0
1 parent 397a684 commit 995a046

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/permutations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ end
2323
# with the difference that we can also define `eltype(::Permutations)`, which is used in some tests.
2424

2525
function Base.iterate(p::Permutations, state=nothing)
26-
if isnothing(state)
26+
if state === nothing
2727
mp = multiset_permutations(eachindex(p.data), p.length)
2828
it = iterate(mp)
29-
if isnothing(it) return nothing end
29+
if it === nothing return nothing end
3030
else
3131
mp, mp_state = state
3232
it = iterate(mp, mp_state)
33-
if isnothing(it) return nothing end
33+
if it === nothing return nothing end
3434
end
3535
indices, mp_state = it
3636
return [p.data[i] for i in indices], (mp=mp, mp_state=mp_state)

0 commit comments

Comments
 (0)