summaryrefslogtreecommitdiff
path: root/src/library/layout/container.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-05-06 10:05:11 +0200
committerLaurenz <laurmaedje@gmail.com>2022-05-06 10:05:11 +0200
commitbfaf5447a789cd0dbbb1e418bea62fef9edc2b7d (patch)
tree0cc1a47b37439fbeda06c57ebef0025becae0066 /src/library/layout/container.rs
parent49b8574b8d03e52a990f7d7b009c36fbdad0d55a (diff)
Cast content from string
Diffstat (limited to 'src/library/layout/container.rs')
-rw-r--r--src/library/layout/container.rs4
1 files changed, 2 insertions, 2 deletions
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<Content> {
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<Content> {
- Ok(Content::Block(args.find()?.unwrap_or_default()))
+ Ok(Content::Block(args.eat()?.unwrap_or_default()))
}
}