diff options
Diffstat (limited to 'src/library/insert.rs')
| -rw-r--r-- | src/library/insert.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/insert.rs b/src/library/insert.rs index eff54e91..4f0f6489 100644 --- a/src/library/insert.rs +++ b/src/library/insert.rs @@ -10,12 +10,12 @@ use crate::prelude::*; /// /// # Positional arguments /// - Path to image file: of type `string`. -pub fn image(ctx: &mut EvalContext, args: &mut Args) -> Value { +pub fn image(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value { let path = args.require::<Spanned<String>>(ctx, "path to image file"); let width = args.get(ctx, "width"); let height = args.get(ctx, "height"); - Value::template(move |ctx| { + Value::template("image", move |ctx| { if let Some(path) = &path { let loaded = ctx.env.resources.load(&path.v, ImageResource::parse); if let Some((res, img)) = loaded { |
