19 lines
397 B
Rust
19 lines
397 B
Rust
use serde::Deserialize;
|
|
use untildify::untildify;
|
|
|
|
use crate::files;
|
|
|
|
#[derive(Deserialize)]
|
|
pub struct Config {
|
|
pub config_dir: String,
|
|
}
|
|
|
|
impl Config {
|
|
pub fn load() -> Config {
|
|
let config_contents = files::load_file_contents(untildify("~/.config/bingobongo.toml"));
|
|
let config: Config = toml::from_str(config_contents.as_str()).unwrap();
|
|
|
|
return config;
|
|
}
|
|
}
|