Skip to content

Commit eb136b9

Browse files
committed
remove type piracy on eltype etc
1 parent 4bc0db2 commit eb136b9

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/sorted_dict.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,16 +308,14 @@ Returns the key type for SortedDict, SortedMultiDict and SortedSet.
308308
This function may also be applied to the type itself. Time: O(1)
309309
"""
310310
@inline Base.keytype(m::SortedDict{K,D,Ord}) where {K,D,Ord <: Ordering} = K
311-
@inline Base.keytype(::Type{SortedDict{K,D,Ord}}) where {K,D,Ord <: Ordering} = K
311+
@inline Base.valtype(m::SortedDict{K,D,Ord}) where {K,D,Ord <: Ordering} = D
312312

313313
"""
314314
valtype(sc)
315315
316316
Returns the value type for SortedDict and SortedMultiDict. This
317317
function may also be applied to the type itself. Time: O(1)
318318
"""
319-
@inline Base.valtype(m::SortedDict{K,D,Ord}) where {K,D,Ord <: Ordering} = D
320-
@inline Base.valtype(::Type{SortedDict{K,D,Ord}}) where {K,D,Ord <: Ordering} = D
321319

322320
"""
323321
ordtype(sc)

src/sorted_set.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,6 @@ end
174174
return exactfound
175175
end
176176

177-
"""
178-
eltype(sc)
179-
180-
Returns the key type for SortedSet.
181-
This function may also be applied to the type itself. Time: O(1)
182-
"""
183-
@inline Base.eltype(::Type{SortedSet{K,Ord}}) where {K,Ord <: Ordering} = K
184-
185177
"""
186178
keytype(sc)
187179

0 commit comments

Comments
 (0)