Skip to content

Commit 685f7bc

Browse files
authored
Merge pull request #889 from eulerkochy/release-0.18
[Backport] Bugfix for resize in RobinDict
2 parents 64e2230 + 72af1f6 commit 685f7bc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DataStructures"
22
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
3-
version = "0.18.15"
3+
version = "0.18.16"
44

55
[deps]
66
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

src/robin_dict.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ function rehash!(h::RobinDict{K,V}, newsz = length(h.keys)) where {K, V}
197197
sz = length(oldk)
198198
newsz = _tablesz(newsz)
199199
if h.count == 0
200-
resize!(h.keys, sz)
201-
resize!(h.vals, sz)
200+
resize!(h.keys, newsz)
201+
resize!(h.vals, newsz)
202202
resize!(h.hashes, newsz)
203203
fill!(h.hashes, 0)
204204
h.count = 0

0 commit comments

Comments
 (0)