tsk-45: Warning fix
All checks were successful
Rust Build / Check (pull_request) Successful in 35s
Rust Build / Test Suite (pull_request) Successful in 37s
Rust Build / Rustfmt (pull_request) Successful in 30s
Rust Build / Clippy (pull_request) Successful in 36s
Rust Build / build (pull_request) Successful in 42s
All checks were successful
Rust Build / Check (pull_request) Successful in 35s
Rust Build / Test Suite (pull_request) Successful in 37s
Rust Build / Rustfmt (pull_request) Successful in 30s
Rust Build / Clippy (pull_request) Successful in 36s
Rust Build / build (pull_request) Successful in 42s
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user