mirror of https://github.com/rwf2/Rocket.git
parent
72bed509b9
commit
944eaa3e3c
|
@ -22,14 +22,15 @@ 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);
|
||||
}
|
||||
return None
|
||||
for error in e.iter() {
|
||||
info_!("{}", error);
|
||||
}
|
||||
|
||||
None
|
||||
} else {
|
||||
Some(tera)
|
||||
}
|
||||
}
|
||||
|
||||
fn render<C: Serialize>(&self, name: &str, context: C) -> Option<String> {
|
||||
if self.get_template(name).is_err() {
|
||||
|
|
Loading…
Reference in New Issue