summaryrefslogtreecommitdiff
path: root/src/layout/document.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/document.rs')
-rw-r--r--src/layout/document.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/layout/document.rs b/src/layout/document.rs
index a91dbbe9..b233ffd8 100644
--- a/src/layout/document.rs
+++ b/src/layout/document.rs
@@ -9,10 +9,10 @@ pub struct Document {
impl Document {
/// Layout the document.
- pub async fn layout(&self, ctx: &mut LayoutContext) -> Vec<BoxLayout> {
+ pub fn layout(&self, ctx: &mut LayoutContext) -> Vec<BoxLayout> {
let mut layouts = vec![];
for run in &self.runs {
- layouts.extend(run.layout(ctx).await);
+ layouts.extend(run.layout(ctx));
}
layouts
}
@@ -31,9 +31,9 @@ pub struct Pages {
impl Pages {
/// Layout the page run.
- pub async fn layout(&self, ctx: &mut LayoutContext) -> Vec<BoxLayout> {
+ pub fn layout(&self, ctx: &mut LayoutContext) -> Vec<BoxLayout> {
let areas = Areas::repeat(self.size);
- let layouted = self.child.layout(ctx, &areas).await;
+ let layouted = self.child.layout(ctx, &areas);
layouted.into_iter().filter_map(Layouted::into_boxed).collect()
}
}