From bfaf5447a789cd0dbbb1e418bea62fef9edc2b7d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 6 May 2022 10:05:11 +0200 Subject: Cast content from string --- src/library/layout/container.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/library/layout/container.rs') diff --git a/src/library/layout/container.rs b/src/library/layout/container.rs index 6689dd48..5264f258 100644 --- a/src/library/layout/container.rs +++ b/src/library/layout/container.rs @@ -8,7 +8,7 @@ impl BoxNode { fn construct(_: &mut Context, args: &mut Args) -> TypResult { let width = args.named("width")?; let height = args.named("height")?; - let body: LayoutNode = args.find()?.unwrap_or_default(); + let body: LayoutNode = args.eat()?.unwrap_or_default(); Ok(Content::inline(body.sized(Spec::new(width, height)))) } } @@ -19,6 +19,6 @@ pub struct BlockNode; #[node] impl BlockNode { fn construct(_: &mut Context, args: &mut Args) -> TypResult { - Ok(Content::Block(args.find()?.unwrap_or_default())) + Ok(Content::Block(args.eat()?.unwrap_or_default())) } } -- cgit v1.2.3