From 88fd7136b25057b78a3269924dbe9f12e0612e83 Mon Sep 17 00:00:00 2001 From: Velka Date: Sat, 20 Apr 2024 16:17:19 +0200 Subject: [PATCH] fix: remove code block from redundant method --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5a64c1b..cea740d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,7 +48,9 @@ fn main() { extension_map.insert("php", "php"); println!("Project tree:"); + println!("```"); print_directory_tree(current_dir, 0, &exclude_patterns); + print!("```"); println!("\nFiles:"); print_file_contents(current_dir, &extensions, &extension_map, &exclude_patterns); @@ -57,8 +59,6 @@ fn main() { fn print_directory_tree(dir: &str, level: usize, exclude_patterns: &[&str]) { let entries = fs::read_dir(dir).unwrap(); - println!("```"); - for (i, entry) in entries.enumerate() { let entry = entry.unwrap(); let path = entry.path(); @@ -81,7 +81,6 @@ fn print_directory_tree(dir: &str, level: usize, exclude_patterns: &[&str]) { } } - print!("```"); } fn print_file_contents(