Fixed ugly config init
This commit is contained in:
parent
054ab7f437
commit
5f69e460cd
@ -43,9 +43,9 @@ async fn main() {
|
|||||||
pretty_env_logger::init();
|
pretty_env_logger::init();
|
||||||
|
|
||||||
// Configure persistent options
|
// Configure persistent options
|
||||||
let config = Settings { channels: vec![] };
|
let config_manager: Arc<Mutex<SettingsManager<Settings>>> = Arc::new(Mutex::new(
|
||||||
let config_manager = Arc::new(Mutex::new(SettingsManager::manage("settings.json", config)));
|
SettingsManager::load("settings.json").expect("Unable to load config!"),
|
||||||
config_manager.lock().await.update();
|
));
|
||||||
|
|
||||||
// Set up framework
|
// Set up framework
|
||||||
let framework = poise::Framework::builder()
|
let framework = poise::Framework::builder()
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user