summaryrefslogtreecommitdiff
path: root/src/library/document.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/document.rs')
-rw-r--r--src/library/document.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/library/document.rs b/src/library/document.rs
index b9a00f9b..84673270 100644
--- a/src/library/document.rs
+++ b/src/library/document.rs
@@ -2,7 +2,7 @@ use super::prelude::*;
use super::PageNode;
/// The root layout node, a document consisting of top-level page runs.
-#[derive(Debug, Hash)]
+#[derive(Hash)]
pub struct DocumentNode(pub Vec<PageNode>);
impl DocumentNode {
@@ -11,3 +11,10 @@ impl DocumentNode {
self.0.iter().flat_map(|node| node.layout(ctx)).collect()
}
}
+
+impl Debug for DocumentNode {
+ fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ f.write_str("Document ")?;
+ f.debug_list().entries(&self.0).finish()
+ }
+}