From 91de2033ba37b58b58afef6da83e194f022e2b32 Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Tue, 31 Dec 2024 10:44:24 +0100 Subject: [PATCH] avoid `isnothing` --- src/recode.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/recode.jl b/src/recode.jl index ac0a9669..4d4b7461 100644 --- a/src/recode.jl +++ b/src/recode.jl @@ -71,7 +71,7 @@ function _recode!(dest::AbstractArray{T}, src::AbstractArray, default, pairs) wh x = src[i] j = Compat.@inline findfirst(y -> isequal(x, y) || recode_in(x,y), recode_from) - if !isnothing(j) + if j !== nothing dest[i] = recode_to[j] @goto nextitem end @@ -121,7 +121,7 @@ function _recode!(dest::CategoricalArray{T, <:Any, R}, src::AbstractArray, defau x = src[i] j = Compat.@inline findfirst(y -> isequal(x, y) || recode_in(x,y), recode_from) - if !isnothing(j) + if j !== nothing drefs[i] = dupvals ? pairmap[j] : j @goto nextitem end