From 2c4ac96893f77aa887766dd138147f84559f62ae Mon Sep 17 00:00:00 2001 From: George Kaklamanos Date: Sat, 2 Dec 2023 14:23:40 +0200 Subject: [PATCH] open,common: Fix unused values and `mut` --- labadoor-common/src/lib.rs | 4 ++-- labadoor-open/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/labadoor-common/src/lib.rs b/labadoor-common/src/lib.rs index e35ed42..a62edc9 100644 --- a/labadoor-common/src/lib.rs +++ b/labadoor-common/src/lib.rs @@ -20,13 +20,13 @@ pub fn run_bin(bin: Binary) -> BinaryResult { process::{Command, Stdio}, }; - let mut ret = Err("".to_string()); + let ret: BinaryResult; let mut iter = bin.iter(); let mut cmd = Command::new(iter.next().unwrap()); cmd.args(iter); let mut child = cmd.stdout(Stdio::piped()).spawn().unwrap(); - let mut success = child.wait().unwrap().success(); + let success = child.wait().unwrap().success(); let mut s = String::from(""); child.stdout.unwrap().read_to_string(&mut s).unwrap(); diff --git a/labadoor-open/src/lib.rs b/labadoor-open/src/lib.rs index 67d5a4c..70dbe11 100644 --- a/labadoor-open/src/lib.rs +++ b/labadoor-open/src/lib.rs @@ -53,7 +53,7 @@ pub fn open(args: OpenArgs) -> Result<(), ()> { let mut identifier = args.identifier.clone(); let mut resource = "Null".to_string(); - for (method, binary) in args.auth.iter() { + for (_, binary) in args.auth.iter() { let output = run_auth(&args, binary.to_vec()); if let Ok(user) = output { identifier = user.username;