From 4bad0eef9b503d4672c576556e31befde29da228 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sat, 26 Aug 2023 11:59:27 -0700 Subject: [PATCH] Clean format strings --- status_cloud/src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/status_cloud/src/main.rs b/status_cloud/src/main.rs index a73f297..c2c8413 100644 --- a/status_cloud/src/main.rs +++ b/status_cloud/src/main.rs @@ -28,16 +28,16 @@ fn main() -> Result<(), Box> { 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> { } } 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> { { 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() } };