Skip to content

Commit 0e8ecb1

Browse files
committed
Clean up formatting
1 parent bd69d2a commit 0e8ecb1

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

benchmark/benchmarks.jl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,11 @@ function benchmark_utilities()
9393
f = if func_k == "copy"
9494
tree -> copy_node(tree; preserve_sharing=(k == "preserve_sharing"))
9595
elseif func_k == "convert"
96-
if v_PACKAGE_VERSION >= v"0.6.1"
97-
tree -> convert(
98-
Node{Float64},
99-
tree;
100-
preserve_sharing=(k == "preserve_sharing"),
101-
)
102-
else
103-
tree -> convert(Node{Float64}, tree)
104-
end
96+
tree -> convert(
97+
Node{Float64},
98+
tree;
99+
preserve_sharing=(k == "preserve_sharing"),
100+
)
105101
elseif func_k == "simplify_tree"
106102
tree -> simplify_tree(tree, options.operators)
107103
elseif func_k == "combine_operators"

test/test_preserve_multiple_parents.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ include("test_params.jl")
4343
copied_base_tree.l.l = x1 * x2 * 5.2 - exp(x3)
4444
# "exp" should appear *twice* now:
4545
copy_with_sharing
46-
@test length(collect(eachmatch(r"exp", string_tree(copy_with_sharing, operators)))) ==
47-
2
46+
@test length(collect(eachmatch(r"exp", string_tree(copy_with_sharing, operators)))) == 2
4847
@test copy_with_sharing.l.l === copy_with_sharing.r
4948
@test hash(copy_with_sharing.l.l) == hash(copy_with_sharing.r)
50-
@test string_tree(copy_with_sharing.l.l, operators) !=
51-
string_tree(base_tree, operators)
49+
@test string_tree(copy_with_sharing.l.l, operators) != string_tree(base_tree, operators)
5250

5351
# We also test whether `convert` breaks shared children.
5452
# The node type here should be Float64.

0 commit comments

Comments
 (0)