diff options
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/mod.rs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/templates/mod.rs b/src/templates/mod.rs index 534ada0..8b8f156 100644 --- a/src/templates/mod.rs +++ b/src/templates/mod.rs @@ -1,16 +1,17 @@ use handlebars::Handlebars; -use once_cell::sync::Lazy; -pub static REGISTRY: Lazy<Handlebars> = Lazy::new(|| { - let mut handlebars = Handlebars::new(); - handlebars - .register_template_string("index", include_str!("index.hbs")) - .unwrap(); - handlebars - .register_template_string("login", include_str!("login.hbs")) - .unwrap(); - handlebars - .register_template_string("base", include_str!("base.hbs")) - .unwrap(); - handlebars -}); +lazy_static! { + pub static ref REGISTRY: Handlebars<'static> = { + let mut handlebars = Handlebars::new(); + handlebars + .register_template_string("index", include_str!("index.hbs")) + .unwrap(); + handlebars + .register_template_string("login", include_str!("login.hbs")) + .unwrap(); + handlebars + .register_template_string("base", include_str!("base.hbs")) + .unwrap(); + handlebars + }; +} |