Skip to content

Commit e125797

Browse files
mcabbottoxinabox
authored andcommitted
rm InplaceableThunk
1 parent 997a84d commit e125797

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

src/projection.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ ProjectTo() = ProjectTo{Any}() # trivial case, exists so that maybe_call(f, x)
118118

119119
# Thunks
120120
(project::ProjectTo)(dx::Thunk) = Thunk(project dx.f)
121-
function (project::ProjectTo)(dx::AbstractThunk)
122-
@error "ProjectTo shouldn't be applied to thunks other than Thunk, such as InplaceableThunk" project dx
123-
return project(unthunk(dx))
124-
end
125121

126122
# Zero
127123
ProjectTo(::AbstractZero) = ProjectTo{NoTangent}() # Any x::Zero in forward pass makes this one projector,

test/projection.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,6 @@ using OffsetArrays, BenchmarkTools
211211
pth = ProjectTo(4+5im)(th)
212212
@test pth isa Thunk
213213
@test unthunk(pth) === 6.0 + 0.0im
214-
215-
ith = InplaceableThunk(th, dx -> dx .+ 7)
216-
@info """don't mind this red "@error" logging message, it's a test!"""
217-
pith = ProjectTo(8)(ith)
218-
@test pith === 6.0
219214
end
220215

221216
@testset "display" begin

0 commit comments

Comments
 (0)