Skip to content

Commit 0444f49

Browse files
committed
remove Base.show! to improve coverage
1 parent 4da8040 commit 0444f49

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

src/avl_tree.jl

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -184,31 +184,4 @@ function Base.delete!(tree::AVLTree{K}, d::K) where K
184184

185185
tree.root = delete_node(tree.root, d)
186186
return tree
187-
end
188-
189-
function print_tree(tree::AVLTree)
190-
function print_tree_helper(node::AVLTreeNode_or_null, indent, isright)
191-
if node != nothing && node.data != nothing
192-
print(indent)
193-
if isright
194-
print("R--")
195-
indent *= " "
196-
else
197-
if (node == tree.root)
198-
print("-->")
199-
indent *= " "
200-
else
201-
print("L--")
202-
indent *= "| "
203-
end
204-
205-
end
206-
println(node.data, " (", get_balance(node), ")" , "H[", get_height(node), "]")
207-
print_tree_helper(node.leftChild, indent, false)
208-
print_tree_helper(node.rightChild, indent, true)
209-
end
210-
end
211-
print_tree_helper(tree.root, "", false)
212-
end
213-
214-
Base.show(io::IO, t::AVLTree) = print_tree(t)
187+
end

0 commit comments

Comments
 (0)