Skip to content

Commit

Permalink
Faster show
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 29, 2020
1 parent 8fa3af1 commit bcdcf57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function ismanaged(node::Node)
end

function Base.show(io::IO, node::Node)
prefix = isdefined(Main, :Node) ? "Node" : "EzXML.Node"
prefix = "EzXML.Node"
ntype = nodetype(node)
if ntype (ELEMENT_NODE, ATTRIBUTE_NODE) && hasnodename(node)
desc = string(repr(ntype), '[', nodename(node), ']')
Expand Down
2 changes: 1 addition & 1 deletion src/streamreader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end
end

function Base.show(io::IO, reader::StreamReader)
prefix = isdefined(Main, :StreamReader) ? "StreamReader" : "EzXML.StreamReader"
prefix = "EzXML.StreamReader"
nodetype_reader = repr(nodetype(reader))
print(io, "$(prefix)(<$(nodetype_reader)>)")
end
Expand Down

0 comments on commit bcdcf57

Please sign in to comment.