mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 14:52:37 +00:00
Box Handlebars template error
See https://github.com/azerupi/mdBook/pull/466#issuecomment-335450110
This commit is contained in:
parent
c64384abc3
commit
56cee872e8
1 changed files with 8 additions and 1 deletions
|
@ -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 a new issue