From 0c5647fee2fcfaebf02e5c505a3cf7d8877814ad Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Mon, 24 Jul 2023 21:29:57 +0800 Subject: [PATCH] some imporvement --- mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data.rs index 7aeb5ea..30ff664 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data.rs @@ -284,11 +284,7 @@ pub mod part_list { explosion_power: Some(0u32), explosion_size: Some(0u32), }); - let attach_points: Option> = if let Some(attach_points) = &self.attach_points { - Some(attach_points.unzip()) - } else { - None - }; + let attach_points: Option> = self.attach_points.as_ref().map(|attach_points| attach_points.unzip()); SR1PartType { id: self.id.clone(), name: self.name.clone(),