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.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/library/document.rs b/src/library/document.rs
index fe01d2df..b9a00f9b 100644
--- a/src/library/document.rs
+++ b/src/library/document.rs
@@ -3,14 +3,11 @@ use super::PageNode;
/// The root layout node, a document consisting of top-level page runs.
#[derive(Debug, Hash)]
-pub struct DocumentNode {
- /// The page runs.
- pub pages: Vec<PageNode>,
-}
+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.pages.iter().flat_map(|node| node.layout(ctx)).collect()
+ self.0.iter().flat_map(|node| node.layout(ctx)).collect()
}
}