From 2ffb14096358cf7a04cfb57ae1e4eb8942273fe8 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Sat, 5 May 2018 13:32:35 +0200 Subject: [PATCH] feat: Counter the lazyness of static variable loading --- src/bin/raptor.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/raptor.rs b/src/bin/raptor.rs index e071d0cc3..772c89f5f 100644 --- a/src/bin/raptor.rs +++ b/src/bin/raptor.rs @@ -108,6 +108,13 @@ fn read_to_vec>(path: P) -> io::Result> { fn main() { drop(env_logger::init()); + + // initialize all "lazy" variables + lazy_static::initialize(&MAP); + lazy_static::initialize(&LEV_AUT_BLDR_0); + lazy_static::initialize(&LEV_AUT_BLDR_1); + lazy_static::initialize(&LEV_AUT_BLDR_2); + let addr = "0.0.0.0:8080".parse().unwrap(); TcpServer::new(Http, addr).serve(|| Ok(MainService {