From c4b8b5faf5b02935eea1744a548dd9e308bfc230 Mon Sep 17 00:00:00 2001 From: Andy Ferris Date: Thu, 3 Aug 2023 23:24:17 +1000 Subject: [PATCH] remove eltype definition from SortedDict and SortedSet (#863) * remove eltype piracy from SortedDict * Update sorted_dict.jl * Remove eltype on SortedSet --------- Co-authored-by: Jameson Nash --- src/sorted_dict.jl | 3 --- src/sorted_set.jl | 1 - 2 files changed, 4 deletions(-) diff --git a/src/sorted_dict.jl b/src/sorted_dict.jl index 2578c56c9..77db9ab94 100644 --- a/src/sorted_dict.jl +++ b/src/sorted_dict.jl @@ -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) diff --git a/src/sorted_set.jl b/src/sorted_set.jl index b2acded75..08b00a974 100644 --- a/src/sorted_set.jl +++ b/src/sorted_set.jl @@ -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