summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2023-03-01 13:14:02 +0100
committerMatthias Beyer <mail@beyermatthias.de>2023-03-01 13:35:17 +0100
commitca701b85d7bec63bca0b0df19430f6a9a5c630ff (patch)
treeef2908c79fb459ee72c80635ac9406c58eada97c
parentf241874a669053ee29d594bb26b0e3dfb4ecf155 (diff)
Fix clippy: Box large error variant
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/error.rs2
-rw-r--r--src/template/mod.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs
index 56721e1..0443c02 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -24,7 +24,7 @@ pub enum Error {
Cargo(#[from] cargo_metadata::Error),
#[error("Error in handlebars template")]
- HandlebarsTemplate(#[from] handlebars::TemplateError),
+ HandlebarsTemplate(#[from] Box<handlebars::TemplateError>),
#[error("Error during template rendering")]
HandlebarsRender(#[from] handlebars::RenderError),
diff --git a/src/template/mod.rs b/src/template/mod.rs
index 9ac29d9..cc03b0f 100644
--- a/src/template/mod.rs
+++ b/src/template/mod.rs
@@ -10,7 +10,9 @@ mod sort_versions_helper;
pub fn new_handlebars(template_source: &str) -> Result<Handlebars, Error> {
let mut handlebars = Handlebars::new();
handlebars.register_escape_fn(handlebars::no_escape);
- handlebars.register_template_string(crate::consts::INTERNAL_TEMPLATE_NAME, template_source)?;
+ handlebars
+ .register_template_string(crate::consts::INTERNAL_TEMPLATE_NAME, template_source)
+ .map_err(Box::new)?;
handlebars.register_helper(
"sort_versions",
Box::new(self::sort_versions_helper::sort_versions),