@@ -662,17 +662,17 @@ function skip_deleted(h::Dict, i)
662
662
return i
663
663
end
664
664
end
665
- return nothing
665
+ return 0
666
666
end
667
667
function skip_deleted_floor! (h:: Dict )
668
668
idx = skip_deleted (h, h. idxfloor)
669
- if idx != = nothing
669
+ if idx != 0
670
670
h. idxfloor = idx
671
671
end
672
672
idx
673
673
end
674
674
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 )
676
676
@propagate_inbounds function iterate (t:: Dict )
677
677
_iterate (t, skip_deleted_floor! (t))
678
678
end
@@ -681,12 +681,12 @@ end
681
681
isempty (t:: Dict ) = (t. count == 0 )
682
682
length (t:: Dict ) = t. count
683
683
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
686
686
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
688
688
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 )
690
690
end
691
691
692
692
filter! (f, d:: Dict ) = filter_in_one_pass! (f, d)
0 commit comments