@@ -662,17 +662,17 @@ function skip_deleted(h::Dict, i)
662662 return i
663663 end
664664 end
665- return nothing
665+ return 0
666666end
667667function skip_deleted_floor! (h:: Dict )
668668 idx = skip_deleted (h, h. idxfloor)
669- if idx != = nothing
669+ if idx != 0
670670 h. idxfloor = idx
671671 end
672672 idx
673673end
674674
675- @propagate_inbounds _iterate (t:: Dict{K,V} , i) where {K,V} = i === nothing ? nothing : (Pair {K,V} (t. keys[i],t. vals[i]), i == typemax (Int) ? nothing : i+ 1 )
675+ @propagate_inbounds _iterate (t:: Dict{K,V} , i) where {K,V} = i == 0 ? nothing : (Pair {K,V} (t. keys[i],t. vals[i]), i == typemax (Int) ? 0 : i+ 1 )
676676@propagate_inbounds function iterate (t:: Dict )
677677 _iterate (t, skip_deleted_floor! (t))
678678end
@@ -681,12 +681,12 @@ end
681681isempty (t:: Dict ) = (t. count == 0 )
682682length (t:: Dict ) = t. count
683683
684- @propagate_inbounds function Base. iterate (v:: T , i:: Union{ Int,Nothing} = v. dict. idxfloor) where T <: Union{KeySet{<:Any, <:Dict}, ValueIterator{<:Dict}}
685- i === nothing && return nothing # This is to catch nothing returned when i = typemax
684+ @propagate_inbounds function Base. iterate (v:: T , i:: Int = v. dict. idxfloor) where T <: Union{KeySet{<:Any, <:Dict}, ValueIterator{<:Dict}}
685+ i == 0 && return nothing
686686 i = skip_deleted (v. dict, i)
687- i === nothing && return nothing # This is to catch nothing returned by skip_deleted
687+ i == 0 && return nothing
688688 vals = T <: KeySet ? v. dict. keys : v. dict. vals
689- (@inbounds vals[i], i == typemax (Int) ? nothing : i+ 1 )
689+ (@inbounds vals[i], i == typemax (Int) ? 0 : i+ 1 )
690690end
691691
692692filter! (f, d:: Dict ) = filter_in_one_pass! (f, d)
0 commit comments