Clean up codebase, use patch in hddtemp Nix store path #1

Merged
Nickiel merged 9 commits from ElnuDev/nicks_nextcloud_integrations:main into main 2023-08-26 12:46:03 -07:00
Showing only changes of commit 4bad0eef9b - Show all commits

View file

@ -28,16 +28,16 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let file_contents = match std::fs::read_to_string(&args.config_file) {
Ok(val) => val,
Err(e) => {
error!("Could not read config file: {}", e.to_string());
panic!("{}", e);
error!("Could not read config file: {e}");
panic!("{e}");
}
};
let cfg: Config = match toml::from_str(file_contents.as_str()) {
Ok(val) => val,
Err(e) => {
error!("Could not parse config file: {}", e.to_string());
panic!("{}", e);
error!("Could not parse config file: {e}");
panic!("{e}");
}
};
@ -58,8 +58,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
}
}
Err(e) => {
error!("Error opening /dev/: {}", e.to_string());
panic!("{}", e);
error!("Error opening /dev/: {e}");
panic!("{e}");
}
};
@ -74,8 +74,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
{
Ok(val) => String::from_utf8_lossy(&val.stdout).into_owned(),
Err(e) => {
warn!("Error running hddtemp: {}", e.to_string());
warn!("Drive was: '{}'", drive);
warn!("Error running hddtemp: {e}");
warn!("Drive was: '{drive}'");
"".to_string()
}
};