Skip to content

Commit

Permalink
avoid isnothing
Browse files Browse the repository at this point in the history
  • Loading branch information
tiemvanderdeure committed Dec 31, 2024
1 parent 445469e commit 91de203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/recode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 91de203

Please sign in to comment.