Skip to content

Commit

Permalink
Fix: use isequal in setindex!
Browse files Browse the repository at this point in the history
  • Loading branch information
mrufsvold committed Jun 12, 2023
1 parent a62759b commit 226a1cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ordered_robin_dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function Base.setindex!(h::OrderedRobinDict{K, V}, v0, key0) where {K,V}
else
@assert haskey(h, key0)
@inbounds orig_v = h.vals[index]
(orig_v != v0) && (@inbounds h.vals[index] = v0)
!isequal(orig_v, v0) && (@inbounds h.vals[index] = v0)
end

check_for_rehash(h) && rehash!(h)
Expand Down

0 comments on commit 226a1cc

Please sign in to comment.