mirror of https://github.com/rwf2/Rocket.git
parent
72bed509b9
commit
944eaa3e3c
|
@ -22,13 +22,14 @@ impl Engine for Tera {
|
|||
// Finally try to tell Tera about all of the templates.
|
||||
if let Err(e) = tera.add_template_files(tera_templates) {
|
||||
error!("Failed to initialize Tera templating.");
|
||||
for error in e.iter().skip(1) {
|
||||
info_!("{}.", error);
|
||||
for error in e.iter() {
|
||||
info_!("{}", error);
|
||||
}
|
||||
return None
|
||||
}
|
||||
|
||||
Some(tera)
|
||||
None
|
||||
} else {
|
||||
Some(tera)
|
||||
}
|
||||
}
|
||||
|
||||
fn render<C: Serialize>(&self, name: &str, context: C) -> Option<String> {
|
||||
|
|
Loading…
Reference in New Issue