From c0d20759a1ecebc0191dfd4d2837db6bb13eec56 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sat, 26 Aug 2023 12:02:54 -0700 Subject: [PATCH] Remove unnecessary .as_str() calls --- status_cloud/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/status_cloud/src/main.rs b/status_cloud/src/main.rs index c2c8413..85138b3 100644 --- a/status_cloud/src/main.rs +++ b/status_cloud/src/main.rs @@ -33,7 +33,7 @@ fn main() -> Result<(), Box> { } }; - let cfg: Config = match toml::from_str(file_contents.as_str()) { + let cfg: Config = match toml::from_str(&file_contents) { Ok(val) => val, Err(e) => { error!("Could not parse config file: {e}"); @@ -87,7 +87,7 @@ fn main() -> Result<(), Box> { } } body_content.push_str("## Hard Drive Temps\n"); - body_content.push_str(drive_temps.join("\n").as_str()); + body_content.push_str(&drive_temps.join("\n")); } Client::new()