Skip to content

Commit 033a58c

Browse files
committed
write initial code for SwissDict, add tests
1 parent ee70afe commit 033a58c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/swiss_dict.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ function SwissDict{K,V}(ps::Pair...) where {K, V}
4242
end
4343
return h
4444
end
45-
4645
SwissDict() = SwissDict{Any,Any}()
4746
SwissDict(kv::Tuple{}) = SwissDict()
4847
copy(d::SwissDict) = SwissDict(d)
@@ -473,4 +472,4 @@ end
473472
is === nothing && return nothing
474473
i, s = is
475474
return (v isa KeySet ? v.dict.keys[i] : v.dict.vals[i], s)
476-
end
475+
end

test/test_swiss_dict.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,4 @@ end
347347
empty!(h)
348348
@test length(h) == 0
349349
@test length(h.keys) == length(h.vals) == prev_sz
350-
end
350+
end

0 commit comments

Comments
 (0)