From e79c62144572d1b9b8a216d13919d21c6bfe9ffe Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Tue, 4 Jan 2022 18:25:48 -0800 Subject: [PATCH] Simplify icon finding --- src/main.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7559333..a96e4f5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,16 +141,14 @@ fn get_metadata() -> CTRConfig { let root_crate = metadata.root_package().expect("No root crate found"); - let icon = String::from("./icon.png"); + let mut icon = String::from("./icon.png"); - let icon = if !Path::new(&icon).exists() { - format!( + if !Path::new(&icon).exists() { + icon = format!( "{}/libctru/default_icon.png", env::var("DEVKITPRO").unwrap() ) - } else { - icon - }; + } CTRConfig { name: root_crate.name.clone(),