Skip to content

Commit

Permalink
small cleanup of dict.jl (#41108)
Browse files Browse the repository at this point in the history
* unused local variable removed, typo in comment fixed

Co-authored-by: Kristoffer Carlsson <[email protected]>
Co-authored-by: Daniel Karrasch <[email protected]>
  • Loading branch information
3 people authored Jun 7, 2021
1 parent e2ad373 commit 612cbe8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ end
# and the key would be inserted at pos
# This version is for use by setindex! and get!
function ht_keyindex2!(h::Dict{K,V}, key) where V where K
age0 = h.age
sz = length(h.keys)
iter = 0
maxprobe = h.maxprobe
Expand Down Expand Up @@ -720,7 +719,7 @@ end
function map!(f, iter::ValueIterator{<:Dict})
dict = iter.dict
vals = dict.vals
# @inbounds is here so the it gets propagated to isslotfiled
# @inbounds is here so that it gets propagated to isslotfilled
@inbounds for i = dict.idxfloor:lastindex(vals)
if isslotfilled(dict, i)
vals[i] = f(vals[i])
Expand Down

0 comments on commit 612cbe8

Please sign in to comment.