Merge pull request #469 from jacwah/ignore

Fix last clippy warnings
This commit is contained in:
Mathieu David 2017-10-18 14:07:10 +02:00 committed by GitHub
commit cb5ae21b89
2 changed files with 9 additions and 1 deletions

View File

@ -105,7 +105,7 @@ pub mod errors {
foreign_links { foreign_links {
Io(::std::io::Error); Io(::std::io::Error);
HandlebarsRender(::handlebars::RenderError); HandlebarsRender(::handlebars::RenderError);
HandlebarsTemplate(::handlebars::TemplateError); HandlebarsTemplate(Box<::handlebars::TemplateError>);
Utf8(::std::string::FromUtf8Error); Utf8(::std::string::FromUtf8Error);
} }
@ -116,4 +116,11 @@ pub mod errors {
} }
} }
} }
// Box to halve the size of Error
impl From<::handlebars::TemplateError> for Error {
fn from(e: ::handlebars::TemplateError) -> Error {
From::from(Box::new(e))
}
}
} }

View File

@ -124,6 +124,7 @@ impl HtmlHandlebars {
Ok(()) Ok(())
} }
#[cfg_attr(feature = "cargo-clippy", allow(let_and_return))]
fn post_process(&self, fn post_process(&self,
rendered: String, rendered: String,
filepath: &str, filepath: &str,