diff --git a/cli/src/main.rs b/cli/src/main.rs index 1e39df8..aee6dd6 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -7,7 +7,6 @@ use std::{ use celeste_rs::saves::def::SaveData; - fn main() { let mut args = std::env::args().skip(1); @@ -44,7 +43,6 @@ fn main() { } } - match command.as_str() { "merge" => merge_saves(arguments, verbose), "stats" => print_stats(arguments, verbose), @@ -55,7 +53,6 @@ fn main() { }; } - fn print_help() { println!( r#"-- Celeste Save Editor CLI -- @@ -72,7 +69,6 @@ fn merge_saves(args: Vec, verbose: bool) -> Option<()> { return None; } - let mut save_a = load_save(&args[0], verbose)?; let save_b = load_save(&args[1], verbose)?; @@ -84,8 +80,9 @@ fn merge_saves(args: Vec, verbose: bool) -> Option<()> { Err(ref e) => { match e.kind() { io::ErrorKind::NotFound => println!("The path '{out_path}' is not found."), - io::ErrorKind::PermissionDenied => - println!("You do not have permissions to access the path '{out_path}'."), + io::ErrorKind::PermissionDenied => { + println!("You do not have permissions to access the path '{out_path}'.") + } _ => println!("Error accessing path '{out_path}': {e}"), }; return None; @@ -206,8 +203,9 @@ fn load_save(path: impl AsRef + Display, verbose: bool) -> Option match e.kind() { io::ErrorKind::NotFound => println!("The path '{path}' is not found."), - io::ErrorKind::PermissionDenied => - println!("You do not have permissions to access the path '{path}'."), + io::ErrorKind::PermissionDenied => { + println!("You do not have permissions to access the path '{path}'.") + } _ => println!("Error accessing path '{path}': {e}"), }, } diff --git a/lib/src/saves/def/everest.rs b/lib/src/saves/def/everest.rs index 1255305..7c984b1 100644 --- a/lib/src/saves/def/everest.rs +++ b/lib/src/saves/def/everest.rs @@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize}; use crate::saves::def::{Areas, Poem}; - #[derive(Serialize, Deserialize, Debug, Clone)] pub struct LevelSetStats { #[serde(rename = "@Name")] diff --git a/lib/src/saves/def/vanilla.rs b/lib/src/saves/def/vanilla.rs index 22839a5..01f2392 100644 --- a/lib/src/saves/def/vanilla.rs +++ b/lib/src/saves/def/vanilla.rs @@ -26,7 +26,6 @@ pub struct LastAreaRef { pub s_id: String, } - #[derive(Serialize, Deserialize, Debug, Clone)] pub struct AreaStats { #[serde(flatten)] diff --git a/lib/src/saves/ops/vanilla.rs b/lib/src/saves/ops/vanilla.rs index 9f19f37..c5f0743 100644 --- a/lib/src/saves/ops/vanilla.rs +++ b/lib/src/saves/ops/vanilla.rs @@ -2,7 +2,6 @@ use std::ops::{Deref, DerefMut}; use crate::saves::def::vanilla::*; - impl Deref for Areas { type Target = Vec; diff --git a/save_gui/src/editor.rs b/save_gui/src/editor.rs index cf660fd..0a938b6 100644 --- a/save_gui/src/editor.rs +++ b/save_gui/src/editor.rs @@ -107,7 +107,6 @@ impl EditorScreen { rfd::AsyncFileDialog::new().set_file_name(&self.file_name); let serialized = self.save.to_string().expect("Error serializing file"); - spawn(rt, async move { if let Some(file) = file_dialogue.save_file().await { #[cfg(not(target_family = "wasm"))] @@ -153,7 +152,6 @@ impl EditorScreen { } }); - ui.horizontal(|ui| { ui.label("Disable Safety Checks:"); ui.checkbox(&mut self.safety_off, ""); @@ -345,14 +343,12 @@ impl EditorScreen { ui.add(DragValue::new(&mut save.total_dashes)); }); - ui.horizontal(|ui| { ui.add(DragValue::new(&mut save.unlocked_areas).clamp_range(1 ..= 10)); }); }); }); - ui.checkbox(&mut save.revealed_farewell, "Revealed Farewell"); } @@ -364,7 +360,6 @@ impl EditorScreen { let theo_knows_name = save.flags.contains(&VanillaFlags::TheoKnowsName.into()); let mut theo_knows_name2 = theo_knows_name; - ui.heading("Vanilla Flags"); ui.checkbox(&mut met_theo2, "Met Theo"); ui.checkbox(&mut theo_knows_name2, "Theo Knows Name"); @@ -585,7 +580,6 @@ fn level_set_widget( ui.info_hover("TODO"); }); - ui.horizontal(|ui| { ui.label("Deaths:"); changed |= ui.add(DragValue::new(&mut stats.deaths)).changed() diff --git a/save_gui/src/main.rs b/save_gui/src/main.rs index 0611d63..1015b37 100644 --- a/save_gui/src/main.rs +++ b/save_gui/src/main.rs @@ -142,7 +142,6 @@ where F: Future + 'static { wasm_bindgen_futures::spawn_local(future) } - fn celeste_save_dir() -> Option { // Celeste puts its save data in the 'local' folder for the os if cfg!(target_family = "unix") {