diff options
Diffstat (limited to 'src/library/placed.rs')
| -rw-r--r-- | src/library/placed.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/library/placed.rs b/src/library/placed.rs index 722e0035..ce76a969 100644 --- a/src/library/placed.rs +++ b/src/library/placed.rs @@ -6,12 +6,10 @@ pub fn place(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { let aligns = args.find().unwrap_or(Spec::new(Some(Align::Left), None)); let tx = args.named("dx")?.unwrap_or_default(); let ty = args.named("dy")?.unwrap_or_default(); - let body: Template = args.expect("body")?; - Ok(Value::Template(Template::from_block(move |style| { - PlacedNode { - child: body.pack(style).moved(Point::new(tx, ty)).aligned(aligns), - } - }))) + let body: Node = args.expect("body")?; + Ok(Value::block(PlacedNode { + child: body.into_block().moved(Point::new(tx, ty)).aligned(aligns), + })) } /// A node that places its child absolutely. |
