Skip to content

Commit 6680c29

Browse files
eulerkochyoxinabox
andauthored
Apply suggestions from code review
Co-authored-by: Lyndon White <[email protected]>
1 parent 594506f commit 6680c29

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/ordered_robin_dict.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ end
123123

124124
function setindex!(h::OrderedRobinDict{K, V}, v0, key0) where {K,V}
125125
key = convert(K,key0)
126-
127126
v = convert(V, v0)
128-
129127
index = get(h.dict, key, -2)
130128

131129
if index < 0
@@ -215,11 +213,8 @@ get!(collection, key, default)
215213

216214
function get!(h::OrderedRobinDict{K,V}, key0, default) where {K,V}
217215
key = convert(K,key0)
218-
219216
index = get(h.dict, key, -2)
220-
221217
index > 0 && return h.vals[index]
222-
223218
v = convert(V, default)
224219
setindex!(h, v, key)
225220
return v
@@ -244,7 +239,6 @@ get!(f::Function, collection, key)
244239
function get!(default::Base.Callable, h::OrderedRobinDict{K,V}, key0) where {K,V}
245240
key = convert(K,key0)
246241
index = get(h.dict, key, -2)
247-
248242
index > 0 && return @inbounds h.vals[index]
249243

250244
v = convert(V, default())
@@ -473,4 +467,4 @@ function merge(combine::Function, d::OrderedRobinDict, others::AbstractDict...)
473467
merge!(combine, OrderedRobinDict{K,V}(), d, others...)
474468
end
475469

476-
isordered(::Type{T}) where {T <: OrderedRobinDict} = true
470+
isordered(::Type{T}) where {T <: OrderedRobinDict} = true

0 commit comments

Comments
 (0)