mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 18:17:39 +08:00
feat: Counter the lazyness of static variable loading
This commit is contained in:
parent
2cb26e327c
commit
2ffb140963
@ -108,6 +108,13 @@ fn read_to_vec<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
drop(env_logger::init());
|
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();
|
let addr = "0.0.0.0:8080".parse().unwrap();
|
||||||
|
|
||||||
TcpServer::new(Http, addr).serve(|| Ok(MainService {
|
TcpServer::new(Http, addr).serve(|| Ok(MainService {
|
||||||
|
Loading…
Reference in New Issue
Block a user