From 7619fea6ffe711d48978176cc31876f58b13175c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Fri, 11 Oct 2024 18:37:51 +0200 Subject: [PATCH] Clippy report fix if can be collapsed --- src/index.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/index.rs b/src/index.rs index 62d11df..83e8853 100644 --- a/src/index.rs +++ b/src/index.rs @@ -31,12 +31,10 @@ fn get_template_path() -> String { String::from(relative_path) }else if Path::new(config_path).exists() { String::from(config_path) + }else if utils::get_os() != "windows" { + format!("{}/{}", executable_path.clone().parent().unwrap().to_str().unwrap(), "index_template.json") }else{ - if utils::get_os() != "windows"{ - format!("{}/{}", executable_path.clone().parent().unwrap().to_str().unwrap(), "index_template.json") - }else{ - format!("{}\\{}", executable_path.clone().parent().unwrap().to_str().unwrap(), "index_template.json") - } + format!("{}\\{}", executable_path.clone().parent().unwrap().to_str().unwrap(), "index_template.json") } }