diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-09 22:56:44 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-09 22:56:44 +0100 |
| commit | f9197dcfef11c4c054a460c80ff6023dae6f1f2a (patch) | |
| tree | 500d28b7a6e35eb99245deaa38367a19dc2aed7b /src/library/insert.rs | |
| parent | 06ca740d01b428f12f6bd327257cd05dce737b03 (diff) | |
Add arguments value 🏓
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 { |
