Skip to content

Commit cfd36b8

Browse files
committed
CI fix
1 parent e4a9af7 commit cfd36b8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/printing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Get the string result of calling [`print_tree`](@ref) with the supplied argument
282282
The `context` argument works as it does in `Base.repr`.
283283
"""
284284
repr_tree(tree; context=nothing, kw...) = repr_tree(printnode, print_child_key, tree; context=nothing, kw...)
285-
function repr_tree(f, g, tree; context=nothing, kw...)
285+
function repr_tree(f::Function, g::Function, tree; context=nothing, kw...)
286286
buf = IOBuffer()
287287
io = context === nothing ? buf : IOContext(buf, context)
288288
print_tree(f, g, io, tree; kw...)

test/printing.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,10 @@ end
190190
""")
191191

192192
# Test printnode override
193-
str = repr_tree(tree) do io, s
194-
if s isa BoxNode
195-
print(io, s.s)
196-
else
197-
AbstractTrees.printnode(io, s)
198-
end
199-
end
193+
_f(io, s) = s isa BoxNode ? print(io, s.s) : AbstractTrees.printnode(io, s)
194+
_g(io, k) = AbstractTrees.print_child_key(io, k)
200195

196+
str = repr_tree(_f, _g, tree)
201197
@test endswith(str, """
202198
├─ "foo"
203199
├─ bar

0 commit comments

Comments
 (0)