From b0e7a176df96cb2dce31ad390bc89c7d3310ea3f Mon Sep 17 00:00:00 2001
From: "iliya.saroukha" <iliya.saroukha@hes-so.ch>
Date: Wed, 8 Feb 2023 20:31:09 +0100
Subject: [PATCH] removed redundant prints

---
 src/main.rs | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 04076f6..44def8b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,5 @@
 mod c_templates;
-use ptree::{self, print_tree, print_tree_with, TreeBuilder};
+use ptree::{print_tree, TreeBuilder};
 use std::fs::File;
 use std::io::{stdin, stdout, Write};
 use std::process::Command;
@@ -75,8 +75,7 @@ fn create_project() {
 }
 
 fn algo_tree() {
-    println!();
-    let tree = TreeBuilder::new("name_of_project".to_string())
+    let tree = TreeBuilder::new("data_struct".to_string())
         .begin_child("struct".to_string())
         .add_empty_child("struct.h".to_string())
         .add_empty_child("struct.c".to_string())
@@ -89,23 +88,13 @@ fn algo_tree() {
 }
 
 fn exam_tree() {
-    println!();
     let tree = TreeBuilder::new("prog_seq_exam_<month>".to_string())
         .begin_child("ex1".to_string())
         .add_empty_child("ex1.c".to_string())
         .add_empty_child("Makefile".to_string())
         .end_child()
-        .begin_child("ex2".to_string())
-        .add_empty_child("ex2.c".to_string())
-        .add_empty_child("Makefile".to_string())
-        .end_child()
-        .begin_child("ex3".to_string())
-        .add_empty_child("ex3.c".to_string())
-        .add_empty_child("Makefile".to_string())
-        .end_child()
-        .begin_child("ex4".to_string())
-        .add_empty_child("ex4.c".to_string())
-        .add_empty_child("Makefile".to_string())
+        .begin_child("ex...".to_string())
+        .add_empty_child("etc...".to_string())
         .end_child()
         .build();
 
@@ -128,7 +117,6 @@ fn print_menu() {
     algo_tree();
     println!("2) Exam");
     exam_tree();
-    println!();
 }
 
 fn main() {
-- 
GitLab