From 99e24d7c1702716ed2c822a24787332fb612ded0 Mon Sep 17 00:00:00 2001 From: Petr Vana Date: Fri, 11 Mar 2022 17:14:39 +0100 Subject: [PATCH] Apply suggestions from code review --- base/dict.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/base/dict.jl b/base/dict.jl index c27936ffb2c3e..4bcdce7931df0 100644 --- a/base/dict.jl +++ b/base/dict.jl @@ -326,12 +326,10 @@ function ht_keyindex2!(h::Dict{K,V}, key) where V where K # in case "key" already exists in a later collided slot. avail = -index end - else - if h.slots[index] == sh - k = pairs[index].first - if key === k || isequal(key, k) - return index, sh - end + elseif h.slots[index] == sh + k = pairs[index].first + if key === k || isequal(key, k) + return index, sh end end