From 6bc393444d415d50144b2c213812ce57eae1c01f Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 18 Jun 2023 16:43:49 +0200 Subject: Style(treewide): Format --- src/new/project.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/new/project.rs') diff --git a/src/new/project.rs b/src/new/project.rs index e04d138..56edead 100644 --- a/src/new/project.rs +++ b/src/new/project.rs @@ -6,17 +6,15 @@ use std::{ process::Command, }; - use convert_case::{Case, Casing}; use crate::data::Data; -use super::{TITLE_FILE, CHAPTER, MAIN_FILE}; +use super::{CHAPTER, MAIN_FILE, TITLE_FILE}; const NEEDED_DIRECTORYS: &'static [&'static str] = &["build", "content", "headers", "references", "resources"]; - pub fn generate_new_project( name: String, first_chapter: String, @@ -41,7 +39,12 @@ pub fn generate_new_project( let mut title_file = File::create("title.tex").unwrap(); title_file.write_all(TITLE_FILE.as_bytes()).unwrap(); - env::set_current_dir(project_root.join("content").join(&first_chapter.to_case(Case::Snake))).unwrap(); + env::set_current_dir( + project_root + .join("content") + .join(&first_chapter.to_case(Case::Snake)), + ) + .unwrap(); fs::create_dir("sections").unwrap(); let mut chapter_file = File::create("chapter_01.tex").unwrap(); chapter_file @@ -102,9 +105,7 @@ pub fn generate_new_project( .expect("failed to execute process"); let mut lpm_file = File::create(".gitignore").unwrap(); - lpm_file - .write_all(b"/build") - .unwrap(); + lpm_file.write_all(b"/build").unwrap(); Ok(()) } -- cgit 1.4.1