Skip to content

Commit 8ba3bb5

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
committed
Apply Runic: drop stray trailing comma in 1-arg anonymous tuples (#3440)
Runic on v7 (7d76855) flagged two files that still had `(x,) -> ...` one-arg anonymous-function syntax where Runic wants `(x) -> ...`: lib/DelayDiffEq/src/functionwrapper.jl ($(args_wo_h...),) → ($(args_wo_h...)) ($(args_wo_h[2:end]...),) → ($(args_wo_h[2:end]...)) lib/DiffEqBase/test/downstream/callback_detection.jl affect1 = (integ,) -> ... → affect1 = (integ) -> ... affect2 = (integ,) -> ... → affect2 = (integ) -> ... The `...`/`$(args...)` splats are single-value in the first file's cases, matching the test file's literal one-arg form; no semantic change. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 18f7c61 commit 8ba3bb5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/DelayDiffEq/src/functionwrapper.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ macro wrap_h(signature)
1313
else
1414
if isinplace(f)
1515
let _f = f.$name, h = h
16-
($(args_wo_h...),) -> _f($(args...))
16+
($(args_wo_h...)) -> _f($(args...))
1717
end
1818
else
1919
let _f = f.$name, h = h
20-
($(args_wo_h[2:end]...),) -> _f($(args[2:end]...))
20+
($(args_wo_h[2:end]...)) -> _f($(args[2:end]...))
2121
end
2222
end
2323
end

lib/DiffEqBase/test/downstream/callback_detection.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ using OrdinaryDiffEq
4242
du[1] = -3sin(3t)
4343
du[2] = -sin(t)
4444
end
45-
affect1 = (integ,) -> push!(record, 1)
46-
affect2 = (integ,) -> push!(record, 2)
45+
affect1 = (integ) -> push!(record, 1)
46+
affect2 = (integ) -> push!(record, 2)
4747
cb1 = ContinuousCallback((u, i, integ) -> u[2], affect1, affect1; rootfind = SciMLBase.LeftRootFind, abstol = 0.0)
4848
cb2 = ContinuousCallback((u, i, integ) -> u[1], affect2, affect2; rootfind = SciMLBase.RightRootFind, abstol = 0.0)
4949

0 commit comments

Comments
 (0)