diff --git a/src/error.rs b/src/error.rs index 41358d73c..eaf26de2b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -106,7 +106,7 @@ impl RenderError { Some(path) => format!("Variable {:?} not found in strict mode.", path), None => "Value is missing in strict mode".to_owned(), }; - RenderError::new(&msg) + RenderError::new(msg) } pub fn from_error(error_info: &str, cause: E) -> RenderError diff --git a/src/registry.rs b/src/registry.rs index 5dd24db53..a345990ca 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -543,7 +543,7 @@ impl<'reg> Registry<'reg> { .map_err(ScriptError::from) .and_then(|s| { let helper = Box::new(ScriptHelper { - script: self.engine.compile(&s)?, + script: self.engine.compile(s)?, }) as Box; Ok(Some(helper.into())) })