From b0dad705bce9387a367db734de522f433c7dfe38 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 08:45:47 -0400 Subject: [PATCH] Fix borrow issue --- src/device.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/device.rs b/src/device.rs index 92462da..af38512 100755 --- a/src/device.rs +++ b/src/device.rs @@ -39,7 +39,7 @@ impl Device{ log::debug!("{:?}",&self.serial); let output_path = OUTPUT_FOLDER.to_owned() + &self.serial + ".txt"; if ! Path::new(&output_path).exists(){ - log::debug!("Creating file {}",output_path); + log::debug!("Creating file {}",&output_path); let temp = fs::File::create(&output_path); match temp{ Ok(file) => { @@ -242,11 +242,11 @@ impl Device{ } fn save_values(&mut self) -> bool{ let output_path = OUTPUT_FOLDER.to_owned() + &self.serial + ".txt"; - let temp = fs::OpenOptions::new().write(true).truncate(true).open(output_path); + let temp = fs::OpenOptions::new().write(true).truncate(true).open(&output_path); match temp{ Ok(opened_file) => self.output_file = Some(opened_file), Err(_) => { - log::warn!("Could not open file [{}] to write! Potential permissions error.",output_path); + log::warn!("Could not open file [{}] to write! Potential permissions error.",&output_path); return false } }