Box Handlebars template error
See https://github.com/azerupi/mdBook/pull/466#issuecomment-335450110
This commit is contained in:
parent
c64384abc3
commit
56cee872e8
|
@ -105,7 +105,7 @@ pub mod errors {
|
|||
foreign_links {
|
||||
Io(::std::io::Error);
|
||||
HandlebarsRender(::handlebars::RenderError);
|
||||
HandlebarsTemplate(::handlebars::TemplateError);
|
||||
HandlebarsTemplate(Box<::handlebars::TemplateError>);
|
||||
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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue