Skip to content

Commit

Permalink
recode_in is always false for identical types
Browse files Browse the repository at this point in the history
  • Loading branch information
tiemvanderdeure committed Nov 22, 2024
1 parent 0581607 commit 06b9265
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/recode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06b9265

Please sign in to comment.