Don't overflow stack when debug-printing an entire document, either.

This commit is contained in:
David Wendt 2019-12-22 00:01:42 -05:00
parent e47a1d1e38
commit b491dd034e
1 changed files with 3 additions and 7 deletions

View File

@ -462,14 +462,10 @@ impl<'gc> fmt::Debug for XMLNode<'gc> {
.field("attributes", attributes)
.field("children", children)
.finish(),
XMLNodeData::DocumentRoot {
script_object,
document,
children,
} => f
XMLNodeData::DocumentRoot { children, .. } => f
.debug_struct("XMLNodeData::DocumentRoot")
.field("script_object", script_object)
.field("document", document)
.field("script_object", &"<Elided>".to_string())
.field("document", &"<Elided>".to_string())
.field("children", children)
.finish(),
}