1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-28 04:44:06 +00:00

Format Rust code using rustfmt

This commit is contained in:
github-actions[bot] 2022-09-08 02:39:14 +00:00 committed by GitHub
parent 36c6e8859a
commit 17f2b05940
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View file

@ -11,7 +11,7 @@ use skyline_web::{Background, WebSession, Webpage};
use smash::lib::lua_const::*;
use std::fs;
use std::path::Path;
use training_mod_consts::{TrainingModpackMenu, MenuJsonStruct};
use training_mod_consts::{MenuJsonStruct, TrainingModpackMenu};
use training_mod_tui::Color;
static mut FRAME_COUNTER_INDEX: usize = 0;
@ -93,7 +93,7 @@ pub unsafe fn set_menu_from_json(message: &str) {
DEFAULTS_MENU = message_json.defaults_menu;
std::fs::write(
MENU_CONF_PATH,
serde_json::to_string_pretty(&message_json).unwrap()
serde_json::to_string_pretty(&message_json).unwrap(),
)
.expect("Failed to write menu conf file");
} else if let Ok(message_json) = serde_json::from_str::<TrainingModpackMenu>(message) {
@ -105,11 +105,8 @@ pub unsafe fn set_menu_from_json(message: &str) {
menu: MENU,
defaults_menu: DEFAULTS_MENU,
};
std::fs::write(
MENU_CONF_PATH,
serde_json::to_string_pretty(&conf).unwrap()
)
.expect("Failed to write menu conf file");
std::fs::write(MENU_CONF_PATH, serde_json::to_string_pretty(&conf).unwrap())
.expect("Failed to write menu conf file");
} else {
skyline::error::show_error(
0x70,

View file

@ -28,7 +28,7 @@ use std::fs;
use crate::menu::{quick_menu_loop, web_session_loop};
use owo_colors::OwoColorize;
use training_mod_consts::{OnOff, MenuJsonStruct};
use training_mod_consts::{MenuJsonStruct, OnOff};
fn nro_main(nro: &NroInfo<'_>) {
if nro.module.isLoaded {