From bac49bc7664ac7fee28b698934af15e3b67e8977 Mon Sep 17 00:00:00 2001 From: Ian Mason Date: Mon, 29 Aug 2022 22:59:19 -0700 Subject: [PATCH] Fix clippy compile error --- src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3860f26..4375291 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,7 +23,7 @@ struct AppData { pub among_us_path: Rc>, } -static AMONG_US_APPID: &'static str = "945360"; +static AMONG_US_APPID: &str = "945360"; fn attempt_run_among_us(install_path: &Path) { let executable_path: PathBuf = [install_path.to_str().unwrap(), "Among Us.exe"] @@ -320,8 +320,7 @@ async fn main() { let auv = ver_smash_split.next().unwrap(); let button_string: String = format!("Town of Us {}", ver_smash_split.next().unwrap()); - let mut index = 0; - for j in &auv_array { + for (index, j) in auv_array.iter().enumerate() { if j == auv { let mut clone = installs_path.clone(); clone.push(existing_ver_smash.clone()); @@ -339,7 +338,6 @@ async fn main() { println!("{}", existing_ver_smash.clone().to_str().unwrap()); } - index += 1; } } for i in flexbox_array {