diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-10 10:29:17 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-10 10:29:17 +0100 |
| commit | 624471db619240f0eed849b92dff6a525ce7e547 (patch) | |
| tree | b6218c031019a78a99c7bb99fcbbe40918e6f2d7 /src/library/container.rs | |
| parent | 6e198bf7606847b0847487a4847d6a3ee3621d2d (diff) | |
Proper error messages for shorthands
Diffstat (limited to 'src/library/container.rs')
| -rw-r--r-- | src/library/container.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/container.rs b/src/library/container.rs index 143bddfc..382be262 100644 --- a/src/library/container.rs +++ b/src/library/container.rs @@ -10,7 +10,7 @@ impl BoxNode { fn construct(_: &mut EvalContext, args: &mut Args) -> TypResult<Template> { let width = args.named("width")?; let height = args.named("height")?; - let body: LayoutNode = args.find().unwrap_or_default(); + let body: LayoutNode = args.find()?.unwrap_or_default(); Ok(Template::inline(body.sized(Spec::new(width, height)))) } } @@ -21,6 +21,6 @@ pub struct BlockNode; #[class] impl BlockNode { fn construct(_: &mut EvalContext, args: &mut Args) -> TypResult<Template> { - Ok(Template::Block(args.find().unwrap_or_default())) + Ok(Template::Block(args.find()?.unwrap_or_default())) } } |
