From d172831e94345533b2861de490fd29bd6a055828 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Sun, 3 Jul 2022 22:59:21 +0900 Subject: [PATCH] cargo fmt --- src/afterfact.rs | 3 +-- src/main.rs | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/afterfact.rs b/src/afterfact.rs index f93823cf..152fe67f 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -65,8 +65,7 @@ lazy_static! { /// level_color.txtファイルを読み込み対応する文字色のマッピングを返却する関数 pub fn set_output_color() -> HashMap { let read_result = utils::read_csv( - utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), -"config/level_color.txt") + utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), "config/level_color.txt") .to_str() .unwrap(), ); diff --git a/src/main.rs b/src/main.rs index 7bd2cab2..ad182426 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,10 +79,12 @@ impl App { fn exec(&mut self) { if *PIVOT_KEYWORD_LIST_FLAG { load_pivot_keywords( - utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), -"config/pivot_keywords.txt") - .to_str() - .unwrap(), + utils::check_setting_path( + &CURRENT_EXE_PATH.to_path_buf(), + "config/pivot_keywords.txt", + ) + .to_str() + .unwrap(), ); } @@ -253,10 +255,12 @@ impl App { .unwrap(); let level_tuning_config_path = match level_tuning_val { Some(path) => path.to_owned(), - _ => utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), - "./rules/config/level_tuning.txt") - .display() - .to_string(), + _ => utils::check_setting_path( + &CURRENT_EXE_PATH.to_path_buf(), + "./rules/config/level_tuning.txt", + ) + .display() + .to_string(), }; if Path::new(&level_tuning_config_path).exists() { @@ -458,7 +462,10 @@ impl App { } fn print_contributors(&self) { - match fs::read_to_string(utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), "contributors.txt")) { + match fs::read_to_string(utils::check_setting_path( + &CURRENT_EXE_PATH.to_path_buf(), + "contributors.txt", + )) { Ok(contents) => { write_color_buffer( &BufferWriter::stdout(ColorChoice::Always), @@ -734,7 +741,7 @@ impl App { match eggs.get(exec_datestr) { None => {} Some(path) => { - let egg_path =utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(),path); + let egg_path = utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), path); let content = fs::read_to_string(egg_path).unwrap_or_default(); write_color_buffer( &BufferWriter::stdout(ColorChoice::Always),