Skip to content

Commit

Permalink
remove type piracy on eltype etc
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Aug 3, 2023
1 parent 4bc0db2 commit eb136b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
4 changes: 1 addition & 3 deletions src/sorted_dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,14 @@ Returns the key type for SortedDict, SortedMultiDict and SortedSet.
This function may also be applied to the type itself. Time: O(1)
"""
@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

"""
valtype(sc)
Returns the value type for SortedDict and SortedMultiDict. This
function may also be applied to the type itself. Time: O(1)
"""
@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

"""
ordtype(sc)
Expand Down
8 changes: 0 additions & 8 deletions src/sorted_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,6 @@ end
return exactfound
end

"""
eltype(sc)
Returns the key type for SortedSet.
This function may also be applied to the type itself. Time: O(1)
"""
@inline Base.eltype(::Type{SortedSet{K,Ord}}) where {K,Ord <: Ordering} = K

"""
keytype(sc)
Expand Down

0 comments on commit eb136b9

Please sign in to comment.