Skip to content

Commit b9b47af

Browse files
authored
Remove unused "deps" mechanism in internal sorting keywords [NFC] (#48634)
1 parent ecfaef3 commit b9b47af

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

base/sort.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,19 +429,18 @@ macro getkw(syms...)
429429
Expr(:block, (:($(esc(:((kw, $sym) = $getter(v, o, kw))))) for (sym, getter) in zip(syms, getters))...)
430430
end
431431

432-
for (sym, deps, exp, type) in [
433-
(:lo, (), :(firstindex(v)), Integer),
434-
(:hi, (), :(lastindex(v)), Integer),
435-
(:mn, (), :(throw(ArgumentError("mn is needed but has not been computed"))), :(eltype(v))),
436-
(:mx, (), :(throw(ArgumentError("mx is needed but has not been computed"))), :(eltype(v))),
437-
(:scratch, (), nothing, :(Union{Nothing, Vector})), # could have different eltype
438-
(:allow_legacy_dispatch, (), true, Bool)]
432+
for (sym, exp, type) in [
433+
(:lo, :(firstindex(v)), Integer),
434+
(:hi, :(lastindex(v)), Integer),
435+
(:mn, :(throw(ArgumentError("mn is needed but has not been computed"))), :(eltype(v))),
436+
(:mx, :(throw(ArgumentError("mx is needed but has not been computed"))), :(eltype(v))),
437+
(:scratch, nothing, :(Union{Nothing, Vector})), # could have different eltype
438+
(:allow_legacy_dispatch, true, Bool)]
439439
usym = Symbol(:_, sym)
440440
@eval function $usym(v, o, kw)
441441
# using missing instead of nothing because scratch could === nothing.
442442
res = get(kw, $(Expr(:quote, sym)), missing)
443443
res !== missing && return kw, res::$type
444-
@getkw $(deps...)
445444
$sym = $exp
446445
(;kw..., $sym), $sym::$type
447446
end

0 commit comments

Comments
 (0)