Skip to content

Commit 16ad573

Browse files
committed
stylistic: return and in
1 parent ae7b114 commit 16ad573

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rule_definition_tools.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ end
421421
function _make_pullback_for_non_differentiable(::Val{N}) where {N}
422422
Vararg{Any,N} # throw early for invalid `N`, must be nonnegative `Int`
423423
function pullback_for_non_differentiable(::Any)
424-
ntuple(Returns(NoTangent()), Val(N))
424+
return ntuple(Returns(NoTangent()), Val(N))
425425
end
426426
end
427427

test/rule_definition_tools.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ end
4949
@test_throws Exception f(Val(-1))
5050
end
5151
@testset "identical objects" begin
52-
for i 0:5
52+
for i in 0:5
5353
v = Val(i)
5454
@test f(v) === f(v)
5555
end
5656
end
5757
@testset "correctness" begin
58-
for i 0:5
58+
for i in 0:5
5959
expected = ntuple((_ -> NoTangent()), i)
6060
@test f(Val(i))(:arbitrary) === expected
6161
end
6262
end
6363
@testset "dispatch" begin
64-
for i 0:5
64+
for i in 0:5
6565
pullback = f(Val(i))
6666
@test_throws MethodError pullback()
6767
@test_throws MethodError pullback(1, 2)

0 commit comments

Comments
 (0)