Clean up unwrap()'s. Print out info in asusctl if error

This commit is contained in:
Luke D. Jones
2021-08-28 11:07:47 +12:00
parent 3d41a7978a
commit c6cc304a42
17 changed files with 143 additions and 70 deletions

View File

@@ -62,7 +62,9 @@ impl ProfileZbus {
if let Ok(mut cfg) = ctrl.config.try_lock() {
// Read first just incase the user has modified the config before calling this
cfg.read();
Profile::set_profile(profile);
Profile::set_profile(profile)
.map_err(|e| warn!("Profile::set_profile, {}", e))
.ok();
cfg.active = profile;
}
ctrl.save_config();