This commit is contained in:
2023-07-21 01:41:14 +02:00
parent 4b171e5670
commit bbbec9773a
4 changed files with 7 additions and 8 deletions

View File

@@ -1,3 +1,5 @@
use once_cell::sync::Lazy;
pub struct Config {
pub telegram_bot_api: reqwest::Url,
@@ -59,6 +61,6 @@ impl Config {
}
}
lazy_static! {
pub static ref CONFIG: Config = Config::load();
}
pub static CONFIG: Lazy<Config> = Lazy::new(|| {
Config::load()
});

View File

@@ -1,6 +1,3 @@
#[macro_use]
extern crate lazy_static;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;