Fix template fairing given 'ConfigError::Missing'.

This commit is contained in:
Sergio Benitez 2018-08-15 19:00:38 -07:00
parent 5fa28ae9d2
commit 429c0dfeb6
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ impl Fairing for TemplateFairing {
let mut template_root = rocket.config().root_relative(DEFAULT_TEMPLATE_DIR); let mut template_root = rocket.config().root_relative(DEFAULT_TEMPLATE_DIR);
match rocket.config().get_str("template_dir") { match rocket.config().get_str("template_dir") {
Ok(dir) => template_root = rocket.config().root_relative(dir), Ok(dir) => template_root = rocket.config().root_relative(dir),
Err(ConfigError::NotFound) => { /* ignore missing configs */ } Err(ConfigError::Missing(_)) => { /* ignore missing */ }
Err(e) => { Err(e) => {
e.pretty_print(); e.pretty_print();
warn_!("Using default templates directory '{:?}'", template_root); warn_!("Using default templates directory '{:?}'", template_root);