Clean up codebase, use patch in hddtemp Nix store path #1
1 changed files with 8 additions and 8 deletions
|
@ -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()
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue