From a5a7a524981005c63931b62567ffca355965b2ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Thu, 8 Apr 2021 13:48:43 +0200 Subject: remove cfg_exists, pass paths explicitly --- mumd/src/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mumd/src/state.rs') diff --git a/mumd/src/state.rs b/mumd/src/state.rs index b52b330..0cf876b 100644 --- a/mumd/src/state.rs +++ b/mumd/src/state.rs @@ -64,7 +64,7 @@ pub struct State { impl State { pub fn new() -> Result { - let config = mumlib::config::read_default_cfg()?; + let config = mumlib::config::read_cfg(&mumlib::config::default_cfg_path())?; let phase_watcher = watch::channel(StatePhase::Disconnected); let audio = Audio::new( config.audio.input_volume.unwrap_or(1.0), @@ -574,7 +574,7 @@ impl State { } pub fn reload_config(&mut self) { - match mumlib::config::read_default_cfg() { + match mumlib::config::read_cfg(&mumlib::config::default_cfg_path()) { Ok(config) => { self.config = config; } -- cgit v1.2.1