summaryrefslogtreecommitdiff
path: root/src/library/document.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-12-15 11:11:57 +0100
committerLaurenz <laurmaedje@gmail.com>2021-12-15 11:11:57 +0100
commitae38be9097bbb32142ef776e77e627ac12379000 (patch)
treef365a348d4c77d2d607d37fee3bc65a601d00a64 /src/library/document.rs
parentfe21c4d399d291e75165b664762f0aa8bdc4724a (diff)
Set Rules Episode IV: A New Fold
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()
+ }
+}