summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-20 18:35:05 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-20 18:35:05 +0200
commit8000783f95ee007d9dda6f1dcc1c42c8e607b122 (patch)
tree85f959948efb97bfc36e4f46c817b21c813e9744 /src/library
parent5edbd3a5b58c11939ea9823c6a847ba447254cb6 (diff)
FileId instead of Path + FileHash
Diffstat (limited to 'src/library')
-rw-r--r--src/library/elements.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/elements.rs b/src/library/elements.rs
index dd2da877..03fccfe7 100644
--- a/src/library/elements.rs
+++ b/src/library/elements.rs
@@ -15,8 +15,8 @@ pub fn image(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
let mut node = None;
if let Some(path) = &path {
- if let Some((resolved, _)) = ctx.resolve(&path.v, path.span) {
- if let Some(id) = ctx.cache.image.load(ctx.loader, &resolved) {
+ if let Some(file) = ctx.resolve(&path.v, path.span) {
+ if let Some(id) = ctx.cache.image.load(ctx.loader, file) {
node = Some(ImageNode { id, width, height });
} else {
ctx.diag(error!(path.span, "failed to load image"));