Skip to content

Commit cb5ae21

Browse files
authored
Merge pull request #469 from jacwah/ignore
Fix last clippy warnings
2 parents c64384a + 7e5892b commit cb5ae21

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub mod errors {
105105
foreign_links {
106106
Io(::std::io::Error);
107107
HandlebarsRender(::handlebars::RenderError);
108-
HandlebarsTemplate(::handlebars::TemplateError);
108+
HandlebarsTemplate(Box<::handlebars::TemplateError>);
109109
Utf8(::std::string::FromUtf8Error);
110110
}
111111

@@ -116,4 +116,11 @@ pub mod errors {
116116
}
117117
}
118118
}
119+
120+
// Box to halve the size of Error
121+
impl From<::handlebars::TemplateError> for Error {
122+
fn from(e: ::handlebars::TemplateError) -> Error {
123+
From::from(Box::new(e))
124+
}
125+
}
119126
}

src/renderer/html_handlebars/hbs_renderer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ impl HtmlHandlebars {
124124
Ok(())
125125
}
126126

127+
#[cfg_attr(feature = "cargo-clippy", allow(let_and_return))]
127128
fn post_process(&self,
128129
rendered: String,
129130
filepath: &str,

0 commit comments

Comments
 (0)