Skip to content

Commit

Permalink
remove eltype definition from SortedDict and SortedSet (JuliaCollecti…
Browse files Browse the repository at this point in the history
…ons#863)

* remove eltype piracy from SortedDict

* Update sorted_dict.jl

* Remove eltype on SortedSet

---------

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
  • Loading branch information
andyferris and vtjnash committed Aug 3, 2023
1 parent ca157a1 commit c4b8b5f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/sorted_dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,8 @@ end


@inline Base.eltype(m::SortedDict{K,D,Ord}) where {K,D,Ord <: Ordering} = Pair{K,D}
@inline Base.eltype(::Type{SortedDict{K,D,Ord}}) where {K,D,Ord <: Ordering} = Pair{K,D}
@inline Base.keytype(m::SortedDict{K,D,Ord}) where {K,D,Ord <: Ordering} = K
@inline Base.keytype(::Type{SortedDict{K,D,Ord}}) where {K,D,Ord <: Ordering} = K
@inline Base.valtype(m::SortedDict{K,D,Ord}) where {K,D,Ord <: Ordering} = D
@inline Base.valtype(::Type{SortedDict{K,D,Ord}}) where {K,D,Ord <: Ordering} = D

"""
Base.in(p::Pair, sd::SortedDict)
Expand Down
1 change: 0 additions & 1 deletion src/sorted_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ convertible to `eltype(m)`. Time: O(*c* log *n*)
return exactfound
end

@inline Base.eltype(::Type{SortedSet{K,Ord}}) where {K,Ord <: Ordering} = K
@inline Base.keytype(m::SortedSet{K,Ord}) where {K,Ord <: Ordering} = K
@inline Base.keytype(::Type{SortedSet{K,Ord}}) where {K,Ord <: Ordering} = K

Expand Down

0 comments on commit c4b8b5f

Please sign in to comment.