From d1d4e3173887e7ecc97aeafc0d2127e3d9bbf7ae Mon Sep 17 00:00:00 2001 From: Lyle Mantooth Date: Sun, 5 Jun 2022 15:56:36 -0400 Subject: [PATCH] Format! --- enemize/src/asar.rs | 20 ++++++++++---------- enemize/src/option_flags.rs | 11 ++++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/enemize/src/asar.rs b/enemize/src/asar.rs index 6a34cd0..033f07d 100644 --- a/enemize/src/asar.rs +++ b/enemize/src/asar.rs @@ -16,19 +16,19 @@ pub fn load_symbols(contents: &str) -> anyhow::Result { _ => None, } }) - .filter_map(|(symbol, mut address)| { - if let Some(colon_at) = address.find(':') { - address.remove(colon_at); - } + .filter_map(|(symbol, mut address)| { + if let Some(colon_at) = address.find(':') { + address.remove(colon_at); + } - // Filter out the ones that don't have a hexadecimal number as the first word. - let snes_address = u32::from_str_radix(&address, 16).ok()?; + // Filter out the ones that don't have a hexadecimal number as the first word. + let snes_address = u32::from_str_radix(&address, 16).ok()?; - let pc_address = snes_to_pc_address(snes_address); + let pc_address = snes_to_pc_address(snes_address); - Some((symbol, pc_address)) - }) - .collect(); + Some((symbol, pc_address)) + }) + .collect(); Ok(symbols) } diff --git a/enemize/src/option_flags.rs b/enemize/src/option_flags.rs index c3f1f0d..0f683e3 100644 --- a/enemize/src/option_flags.rs +++ b/enemize/src/option_flags.rs @@ -387,13 +387,11 @@ pub struct OptionFlags { pub enemy_damage_chaos_mode: bool, //pub easy_mode_escape: bool, - pub enemies_absorbable: bool, pub absorbable_spawn_rate: u8, pub absorbable_types: HashMap, //pub boss_madness: bool, - pub randomize_bosses: bool, pub randomize_bosses_type: RandomizeBossesType, @@ -406,7 +404,6 @@ pub struct OptionFlags { //pub randomize_boss_damage_max_amount: u8, //pub randomize_boss_behavior: bool, - pub randomize_dungeon_palettes: bool, pub set_blackout_mode: bool, @@ -766,8 +763,12 @@ mod test { fn test_option_flags_serde() { let empty = "{}"; let actual: OptionFlags = serde_json::from_str(empty).expect("Can't deserialize empty"); - let expected = serde_json::to_string(&OptionFlags::default()).expect("Can't serialize default"); + let expected = + serde_json::to_string(&OptionFlags::default()).expect("Can't serialize default"); - assert_eq!(serde_json::to_string(&actual).expect("Can't roundtrip"), expected); + assert_eq!( + serde_json::to_string(&actual).expect("Can't roundtrip"), + expected + ); } }