From 38157b0e0cbab22dc3f5fa5cc66d9b673a18a55b Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 12 Oct 2020 17:10:01 +0200 Subject: =?UTF-8?q?Synchronous=20layout=20=F0=9F=AA=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/document.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/layout/document.rs') 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 { + pub fn layout(&self, ctx: &mut LayoutContext) -> Vec { 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 { + pub fn layout(&self, ctx: &mut LayoutContext) -> Vec { 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() } } -- cgit v1.2.3