diff --git a/src/error.rs b/src/error.rs index 0ffd7b9f9..6d83ad5f5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -250,7 +250,7 @@ impl fmt::Display for TemplateError { quick_error! { #[derive(Debug)] pub enum ScriptError { - IOError(err: IOError) { + IoError(err: IOError) { from() source(err) } diff --git a/src/render.rs b/src/render.rs index d9da9e4a7..0ffeb86d4 100644 --- a/src/render.rs +++ b/src/render.rs @@ -761,8 +761,8 @@ impl Renderable for TemplateElement { out.write(v.as_ref())?; Ok(()) } - Expression(ref ht) | HTMLExpression(ref ht) => { - let is_html_expression = matches!(self, HTMLExpression(_)); + Expression(ref ht) | HtmlExpression(ref ht) => { + let is_html_expression = matches!(self, HtmlExpression(_)); if is_html_expression { rc.set_disable_escape(true); } @@ -883,7 +883,7 @@ fn test_expression() { #[test] fn test_html_expression() { let r = Registry::new(); - let element = HTMLExpression(Box::new(HelperTemplate::with_path(Path::with_named_paths( + let element = HtmlExpression(Box::new(HelperTemplate::with_path(Path::with_named_paths( &["hello"], )))); diff --git a/src/template.rs b/src/template.rs index 107340451..4f2ed236a 100644 --- a/src/template.rs +++ b/src/template.rs @@ -602,7 +602,7 @@ impl Template { let el = if rule == Rule::expression { Expression(Box::new(helper_template)) } else { - HTMLExpression(Box::new(helper_template)) + HtmlExpression(Box::new(helper_template)) }; let t = template_stack.front_mut().unwrap(); t.push_element(el, line_no, col_no); @@ -722,7 +722,7 @@ impl Template { #[derive(PartialEq, Clone, Debug)] pub enum TemplateElement { RawString(String), - HTMLExpression(Box), + HtmlExpression(Box), Expression(Box), HelperBlock(Box), DecoratorExpression(Box), @@ -781,7 +781,7 @@ fn test_parse_template() { assert_eq!( *t.elements.get(3).unwrap(), - HTMLExpression(Box::new(HelperTemplate::with_path(Path::with_named_paths( + HtmlExpression(Box::new(HelperTemplate::with_path(Path::with_named_paths( &["content"], )))) );