Skip to content

Commit 0cfea7d

Browse files
LilithHafnerKristofferC
authored and
KristofferC
committed
Remove unused "deps" mechanism in internal sorting keywords [NFC] (#48634)
(cherry picked from commit b9b47af)
1 parent 42537ee commit 0cfea7d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

base/sort.jl

+7-8
Original file line numberDiff line numberDiff line change
@@ -414,19 +414,18 @@ macro getkw(syms...)
414414
Expr(:block, (:($(esc(:((kw, $sym) = $getter(v, o, kw))))) for (sym, getter) in zip(syms, getters))...)
415415
end
416416

417-
for (sym, deps, exp, type) in [
418-
(:lo, (), :(firstindex(v)), Integer),
419-
(:hi, (), :(lastindex(v)), Integer),
420-
(:mn, (), :(throw(ArgumentError("mn is needed but has not been computed"))), :(eltype(v))),
421-
(:mx, (), :(throw(ArgumentError("mx is needed but has not been computed"))), :(eltype(v))),
422-
(:scratch, (), nothing, :(Union{Nothing, Vector})), # could have different eltype
423-
(:allow_legacy_dispatch, (), true, Bool)]
417+
for (sym, exp, type) in [
418+
(:lo, :(firstindex(v)), Integer),
419+
(:hi, :(lastindex(v)), Integer),
420+
(:mn, :(throw(ArgumentError("mn is needed but has not been computed"))), :(eltype(v))),
421+
(:mx, :(throw(ArgumentError("mx is needed but has not been computed"))), :(eltype(v))),
422+
(:scratch, nothing, :(Union{Nothing, Vector})), # could have different eltype
423+
(:allow_legacy_dispatch, true, Bool)]
424424
usym = Symbol(:_, sym)
425425
@eval function $usym(v, o, kw)
426426
# using missing instead of nothing because scratch could === nothing.
427427
res = get(kw, $(Expr(:quote, sym)), missing)
428428
res !== missing && return kw, res::$type
429-
@getkw $(deps...)
430429
$sym = $exp
431430
(;kw..., $sym), $sym::$type
432431
end

0 commit comments

Comments
 (0)