From c47e8d9ec856f429f3d3a20e7287764c9e3a6834 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Wed, 21 Feb 2018 10:43:01 +0100 Subject: [PATCH] Remove useless in() methods These are not actually needed for standard collections, which rely on isequal() or == and hash(). They create ambiguities and can even be incorrect, e.g. for ObjectIdDict. They could even be less efficient than the default if we stored hashes and implemented optimized hash(::CatValue, ::UInt) methods. For reference, they have been introduced in 9638d31. --- src/value.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/value.jl b/src/value.jl index 76ee2296..5977f254 100644 --- a/src/value.jl +++ b/src/value.jl @@ -115,8 +115,6 @@ Base.isequal(x::Any, y::CatValue) = isequal(y, x) Base.isequal(::CatValue, ::Missing) = false Base.isequal(::Missing, ::CatValue) = false -Base.in(x::CatValue, y::Any) = get(x) in y -Base.in(x::CatValue, y::Set) = get(x) in y Base.in(x::CatValue, y::AbstractRange{T}) where {T<:Integer} = get(x) in y Base.hash(x::CatValue, h::UInt) = hash(get(x), h)