Skip to content

Commit e53ac6a

Browse files
authored
Merge branch 'master' into sbromberger/dibitvectors
2 parents ba5826f + 082b283 commit e53ac6a

File tree

7 files changed

+17
-3
lines changed

7 files changed

+17
-3
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Changelog is now in the [Github Release Notes](https://github.com/JuliaCollections/DataStructures.jl/releases).
2+
3+
4+
## Old Changelong (pre-2018)
15

26
0.7.0 / 2017-09-02
37
==================

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ makedocs(
1818
"heaps.md",
1919
"ordered_containers.md",
2020
"default_dict.md",
21+
"robin_dict.md",
2122
"trie.md",
2223
"linked_list.md",
2324
"mutable_linked_list.md",

src/DataStructures.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module DataStructures
55
in, haskey, keys, merge, copy, cat, collect,
66
push!, pop!, pushfirst!, popfirst!, insert!, lastindex,
77
union!, delete!, similar, sizehint!, empty, append!,
8-
isequal, hash, map, filter, reverse,
8+
isequal, hash, map, filter, reverse, peek,
99
first, last, eltype, getkey, values, sum,
1010
merge, merge!, lt, Ordering, ForwardOrdering, Forward,
1111
ReverseOrdering, Reverse, Lt,

src/robin_dict.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ function empty!(h::RobinDict{K,V}) where {K, V}
285285
resize!(h.keys, sz)
286286
resize!(h.vals, sz)
287287
resize!(h.hashes, sz)
288+
fill!(h.hashes, 0)
288289
h.count = 0
289290
h.idxfloor = 0
290291
return h

src/sparse_int_set.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ struct ZippedSparseIntSetIterator{VT,IT}
210210
end
211211
end
212212

213-
Base.zip(s::SparseIntSet...;kwargs...) = ZippedSparseIntSetIterator(s...;kwargs...)
213+
function Base.zip(s0::SparseIntSet, s::SparseIntSet...; kwargs...)
214+
return ZippedSparseIntSetIterator(s0, s...; kwargs...)
215+
end
214216

215217
length(it::ZippedSparseIntSetIterator) = length(it.shortest_set)
216218

test/test_robin_dict.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ end
330330
@test h.count == 0
331331
@test h.idxfloor == 0
332332
@test length(h.hashes) == length(h.keys) == length(h.vals) == length0
333+
for i=-1000:1000
334+
@test !haskey(h, i)
335+
end
333336
end
334337

335338
@testset "ArgumentError" begin
@@ -424,4 +427,4 @@ end
424427
h[i] = i+1
425428
end
426429
check_invariants(h)
427-
end
430+
end

test/test_sparse_int_set.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,8 @@ import DataStructures: SparseIntSet
185185
end
186186
@test s1 == 4*24
187187
end
188+
if VERSION >= v"1.1"
189+
@test zip() isa Iterators.Zip # issue 621
190+
end
188191

189192
end

0 commit comments

Comments
 (0)