Skip to content

Commit

Permalink
Remove unneeded deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
sharanry committed Nov 5, 2023
1 parent 31745cc commit 19a54fe
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ext/LinearSolveEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ end
function EnzymeCore.EnzymeRules.forward(func::Const{typeof(LinearSolve.solve!)}, ::Type{RT}, linsolve::EnzymeCore.Annotation{LP}; kwargs...) where {RT, LP <: LinearSolve.LinearCache}
@assert !(linsolve isa Const)

Check warning on line 29 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L28-L29

Added lines #L28 - L29 were not covered by tests

linsolve = deepcopy(linsolve) #mutates after function is applied
res = func.val(linsolve.val; kwargs...)

Check warning on line 31 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L31

Added line #L31 was not covered by tests

if RT <: Const
Expand Down

0 comments on commit 19a54fe

Please sign in to comment.