From ae38be9097bbb32142ef776e77e627ac12379000 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 15 Dec 2021 11:11:57 +0100 Subject: Set Rules Episode IV: A New Fold --- src/library/document.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/library/document.rs') 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); 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() + } +} -- cgit v1.2.3