File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const CONTENT_JSON_CONFIG: &str = r#"{
2222pub fn init_yes (
2323 path_to_logo : & str ,
2424 path_to_banner : & str ,
25- what_type : Vec < i32 > ,
25+ what_type : & str ,
2626 is_open_source : & str ,
2727 can_mess_with_computer : & str ,
2828 title : & str ,
@@ -53,15 +53,6 @@ pub fn init_yes(
5353 fs:: create_dir ( extended_path) . unwrap ( ) ;
5454 }
5555
56- let mut returned_type_shi: & str = "Other" ;
57- for num in what_type {
58- if num == 1 {
59- returned_type_shi = "Scripts" ;
60- } else if num == 2 {
61- returned_type_shi = "Mods" ;
62- }
63- }
64-
6556 let populated_json = CONTENT_JSON_CONFIG
6657 . replace ( "{is_open_source}" , is_open_source)
6758 . replace ( "{can_mess_with_computer}" , can_mess_with_computer)
@@ -72,7 +63,7 @@ pub fn init_yes(
7263 . replace ( "{external_url}" , external_url)
7364 . replace ( "{github_url}" , github_url)
7465 . replace ( "{made_by_url}" , made_by_url)
75- . replace ( "{type}" , returned_type_shi ) ;
66+ . replace ( "{type}" , what_type ) ;
7667
7768 let formatted_readme = CONTENT_README
7869 . replace ( "{title}" , title) ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ fn main() {
2525 initialize_everything:: init_yes (
2626 & path_to_logo,
2727 & path_to_banner,
28- what_type,
28+ & what_type,
2929 & is_open_source,
3030 & can_mess_with_computer,
3131 & title,
You can’t perform that action at this time.
0 commit comments