diff options
Diffstat (limited to 'src/manager')
-rw-r--r-- | src/manager/mod.rs | 9 | ||||
-rw-r--r-- | src/manager/updater.rs | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/manager/mod.rs b/src/manager/mod.rs index 39e486c..646349a 100644 --- a/src/manager/mod.rs +++ b/src/manager/mod.rs @@ -58,12 +58,11 @@ impl Manager { fn current_load(&mut self) -> bool { let data = match fileutil::load(&self.state_path) { - Ok(Some(data)) => data, - Ok(None) => { - return false; - } + Ok(data) => data, Err(e) => { - eprintln!("<3>Failed to read interface state: {}", e); + if e.kind() != io::ErrorKind::NotFound { + eprintln!("<3>Failed to read interface state: {}", e); + } return false; } }; diff --git a/src/manager/updater.rs b/src/manager/updater.rs index db24d6e..ca04ce9 100644 --- a/src/manager/updater.rs +++ b/src/manager/updater.rs @@ -46,12 +46,11 @@ impl Updater { }; let data = match fileutil::load(&path) { - Ok(Some(data)) => data, - Ok(None) => { - return false; - } + Ok(data) => data, Err(e) => { - eprintln!("<3>Failed to read [{}] from cache: {}", &src.config.name, e); + if e.kind() != io::ErrorKind::NotFound { + eprintln!("<3>Failed to read [{}] from cache: {}", &src.config.name, e); + } return false; } }; |