From f206de5d49eda1900552a4b19f01c8c6985b7903 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Wed, 28 Apr 2021 19:58:27 -0400 Subject: finally committed to structopt arg parsing --- src/templates/mod.rs | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/templates') 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 = 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 + }; +} -- cgit v1.2.3