diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-12-20 14:18:29 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-12-21 00:20:24 +0100 |
| commit | 11565a40b315212474f52eb576a9fd92b11f1132 (patch) | |
| tree | c6b7afb35103065bc92b407094ca905bb75cfc73 /src/library/document.rs | |
| parent | 958f74f77707340f34ee36d09492bdb74523aa2a (diff) | |
Set Rules Episode IX: The Rise of Testing
Diffstat (limited to 'src/library/document.rs')
| -rw-r--r-- | src/library/document.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/library/document.rs b/src/library/document.rs deleted file mode 100644 index 84673270..00000000 --- a/src/library/document.rs +++ /dev/null @@ -1,20 +0,0 @@ -use super::prelude::*; -use super::PageNode; - -/// The root layout node, a document consisting of top-level page runs. -#[derive(Hash)] -pub struct DocumentNode(pub Vec<PageNode>); - -impl DocumentNode { - /// Layout the document into a sequence of frames, one per page. - pub fn layout(&self, ctx: &mut LayoutContext) -> Vec<Rc<Frame>> { - 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() - } -} |
