Skip to content

Commit 1718410

Browse files
Merge pull request #473 from isaacsas/unique-fix
unique -> unique! in get_variables!
2 parents c9678ab + 38ece35 commit 1718410

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function get_variables!(vars, e::Operation, varlist=nothing)
9797
else
9898
foreach(x -> get_variables!(vars, x, varlist), e.args)
9999
end
100-
return unique(vars)
100+
return (vars isa AbstractVector) ? unique!(vars) : vars
101101
end
102102
get_variables(e::Operation, varlist=nothing) = get_variables!(Operation[], e, varlist)
103103

0 commit comments

Comments
 (0)