Skip to content

Commit

Permalink
Merge pull request #96 from chriselrod/patch-1
Browse files Browse the repository at this point in the history
Remove invalidating method
  • Loading branch information
Tokazama authored Jul 21, 2023
2 parents d4e7865 + 1277882 commit b6427c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "OrderedCollections"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.6.0"
version = "1.6.1"

[compat]
julia = "1.6"
Expand Down
4 changes: 2 additions & 2 deletions src/ordered_dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ isordered(::Type{T}) where {T<:OrderedDict} = true

# conversion between OrderedDict types
function convert(::Type{OrderedDict{K,V}}, d::AbstractDict) where {K,V}
d isa OrderedDict{K, V} && return d
if !isordered(typeof(d))
Base.depwarn("Conversion to OrderedDict is deprecated for unordered associative containers (in this case, $(typeof(d))). Use an ordered or sorted associative type, such as SortedDict and OrderedDict.", :convert)
end
Expand All @@ -112,7 +113,6 @@ function convert(::Type{OrderedDict{K,V}}, d::AbstractDict) where {K,V}
end
return h
end
convert(::Type{OrderedDict{K,V}},d::OrderedDict{K,V}) where {K,V} = d

isslotempty(slot_value::Integer) = slot_value == 0
isslotfilled(slot_value::Integer) = slot_value > 0
Expand Down Expand Up @@ -493,4 +493,4 @@ function Base.map!(f, iter::Base.ValueIterator{<:OrderedDict})
return iter
end

last(h::OrderedDict) = h.keys[end] => h.vals[end]
last(h::OrderedDict) = h.keys[end] => h.vals[end]

2 comments on commit b6427c0

@Tokazama
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/88023

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.6.1 -m "<description of version>" b6427c003ebd62973e09931151a788e6f7ec9bde
git push origin v1.6.1

Please sign in to comment.