Skip to content

Commit

Permalink
selector not bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Oct 27, 2023
1 parent 37429b3 commit c3d8cb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LookupArrays/selector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function contains(::Points, l::LookupArray, sel::Contains; kw...)
end
# Intervals -----------------------------------
function contains(sampling::Intervals, l::LookupArray, sel::Contains; err=_True())
_locus_checkbounds(locus(l), l, sel) || return _boundserror_or_nothing(err, l, sel)
_locus_checkbounds(locus(l), l, sel) || return _selector_error_or_nothing(err, l, sel)
contains(order(l), span(l), sampling, locus(l), l, sel; err)
end
# Regular Intervals ---------------------------
Expand Down Expand Up @@ -392,8 +392,8 @@ function contains(
return i
end

_boundserror_or_nothing(err::_True, l, i) = throw(SelectorError(l, i))
_boundserror_or_nothing(err::_False, l, i) = nothing
_selector_error_or_nothing(err::_True, l, i) = throw(SelectorError(l, i))
_selector_error_or_nothing(err::_False, l, i) = nothing

_notcontained_or_nothing(err::_True, selval) = _notcontainederror(selval)
_notcontained_or_nothing(err::_False, selval) = nothing
Expand Down

0 comments on commit c3d8cb6

Please sign in to comment.