Skip to content

Commit

Permalink
run updated formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
maddymakesgames committed Mar 1, 2024
1 parent ee731da commit 0ab2ea0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
14 changes: 6 additions & 8 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{

use celeste_rs::saves::def::SaveData;


fn main() {
let mut args = std::env::args().skip(1);

Expand Down Expand Up @@ -44,7 +43,6 @@ fn main() {
}
}


match command.as_str() {
"merge" => merge_saves(arguments, verbose),
"stats" => print_stats(arguments, verbose),
Expand All @@ -55,7 +53,6 @@ fn main() {
};
}


fn print_help() {
println!(
r#"-- Celeste Save Editor CLI --
Expand All @@ -72,7 +69,6 @@ fn merge_saves(args: Vec<String>, verbose: bool) -> Option<()> {
return None;
}


let mut save_a = load_save(&args[0], verbose)?;
let save_b = load_save(&args[1], verbose)?;

Expand All @@ -84,8 +80,9 @@ fn merge_saves(args: Vec<String>, 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;
Expand Down Expand Up @@ -206,8 +203,9 @@ fn load_save(path: impl AsRef<Path> + Display, verbose: bool) -> Option<SaveData
},
Err(ref e) => 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}"),
},
}
Expand Down
1 change: 0 additions & 1 deletion lib/src/saves/def/everest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
1 change: 0 additions & 1 deletion lib/src/saves/def/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub struct LastAreaRef {
pub s_id: String,
}


#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AreaStats {
#[serde(flatten)]
Expand Down
1 change: 0 additions & 1 deletion lib/src/saves/ops/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::ops::{Deref, DerefMut};

use crate::saves::def::vanilla::*;


impl Deref for Areas {
type Target = Vec<AreaStats>;

Expand Down
6 changes: 0 additions & 6 deletions save_gui/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))]
Expand Down Expand Up @@ -153,7 +152,6 @@ impl EditorScreen {
}
});


ui.horizontal(|ui| {
ui.label("Disable Safety Checks:");
ui.checkbox(&mut self.safety_off, "");
Expand Down Expand Up @@ -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");
}

Expand All @@ -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");
Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion save_gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ where F: Future<Output = ()> + 'static {
wasm_bindgen_futures::spawn_local(future)
}


fn celeste_save_dir() -> Option<PathBuf> {
// Celeste puts its save data in the 'local' folder for the os
if cfg!(target_family = "unix") {
Expand Down

0 comments on commit 0ab2ea0

Please sign in to comment.