diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
| commit | 38157b0e0cbab22dc3f5fa5cc66d9b673a18a55b (patch) | |
| tree | 967dab30f04537b93126586dbb7f7b0d166290e4 /src/layout/node.rs | |
| parent | e94627721db89c3b08aa17f54d59d19a09f7816f (diff) | |
Synchronous layout 🪀
Diffstat (limited to 'src/layout/node.rs')
| -rw-r--r-- | src/layout/node.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/layout/node.rs b/src/layout/node.rs index 31213b9d..4cba3d4f 100644 --- a/src/layout/node.rs +++ b/src/layout/node.rs @@ -24,13 +24,12 @@ impl LayoutNode { } } -#[async_trait(?Send)] impl Layout for LayoutNode { - async fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec<Layouted> { + fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec<Layouted> { match self { - Self::Spacing(spacing) => spacing.layout(ctx, areas).await, - Self::Text(text) => text.layout(ctx, areas).await, - Self::Dyn(boxed) => boxed.layout(ctx, areas).await, + Self::Spacing(spacing) => spacing.layout(ctx, areas), + Self::Text(text) => text.layout(ctx, areas), + Self::Dyn(boxed) => boxed.layout(ctx, areas), } } } |
