From 06b9265fba770033dc539adcb352e54e57c7c591 Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Fri, 22 Nov 2024 14:55:47 +0100 Subject: [PATCH] recode_in is always false for identical types --- src/recode.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/recode.jl b/src/recode.jl index 1b6aeae9..86817d59 100644 --- a/src/recode.jl +++ b/src/recode.jl @@ -47,6 +47,8 @@ A user defined type could override this method to define an appropriate test fun """ @inline recode_in(x, collection) = any(x ≅ y for y in collection) @inline recode_in(x, ::Missing) = false +@inline recode_in(::T, ::T) where T = false +@inline recode_in(::Missing, ::Missing) where T = false optimize_pair(pair::Pair) = pair optimize_pair(pair::Pair{<:AbstractArray}) = Set(pair.first) => pair.second