Clean format strings

pull/1/head
Elnu 1 year ago
parent 6576e2f3f9
commit 4bad0eef9b

@ -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…
Cancel
Save