Update deps + fix tera fn error msg
This commit is contained in:
parent
be149646f6
commit
8c1faac761
768
Cargo.lock
generated
768
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -163,11 +163,11 @@ impl TeraFn for GetImageMeta {
|
||||||
let path = required_arg!(
|
let path = required_arg!(
|
||||||
String,
|
String,
|
||||||
args.get("path"),
|
args.get("path"),
|
||||||
"`get_image_meta` requires a `path` argument with a string value"
|
"`get_image_metadata` requires a `path` argument with a string value"
|
||||||
);
|
);
|
||||||
let src_path = self.content_path.join(&path);
|
let src_path = self.content_path.join(&path);
|
||||||
if !src_path.exists() {
|
if !src_path.exists() {
|
||||||
return Err(format!("`get_image_meta`: Cannot find path: {}", path).into());
|
return Err(format!("`get_image_metadata`: Cannot find path: {}", path).into());
|
||||||
}
|
}
|
||||||
let img = image::open(&src_path)
|
let img = image::open(&src_path)
|
||||||
.map_err(|e| Error::chain(format!("Failed to process image: {}", path), e))?;
|
.map_err(|e| Error::chain(format!("Failed to process image: {}", path), e))?;
|
||||||
|
|
Loading…
Reference in a new issue