From 11332b58a12f1f27d3732c3197758cb131f4863f Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 23 Oct 2025 16:12:21 -0400 Subject: [PATCH] tsk-45: Warning fix --- src/config.rs | 6 +----- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/config.rs b/src/config.rs index d316495..760d951 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,11 +9,7 @@ pub struct App { impl App { pub fn does_root_directory_exists(&self) -> bool { let path = std::path::Path::new(&self.root_directory); - if path.exists() { - if path.is_dir() { true } else { false } - } else { - false - } + if path.exists() { path.is_dir() } else { false } } } diff --git a/src/main.rs b/src/main.rs index b5de943..0614ab5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,7 +19,7 @@ async fn main() -> Result<(), Box> { eprintln!("Root directory does not exist"); println!("Attempting to create directory"); let path = std::path::Path::new(&app.root_directory); - match std::fs::create_dir(&path) { + match std::fs::create_dir(path) { Ok(_) => { println!("Directory created"); }