diff --git a/docs/src/change_log/dr_game.md b/docs/src/change_log/dr_game.md index b5c98db..6871cb2 100644 --- a/docs/src/change_log/dr_game.md +++ b/docs/src/change_log/dr_game.md @@ -9,8 +9,8 @@ ### Changes -- `types.rs` 利用可用的 Clippy 改进了代码 - - `types.rs` improved the code with available Clippy +- `types.rs` & `python.rs` 利用可用的 Clippy 改进了代码 + - `types.rs` & `python.rs` improved the code with available Clippy ## DR game 0.3.1.1 diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs index 678d546..3377cd6 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs @@ -97,11 +97,7 @@ pub mod data { fn get_part_type(&self, name: String) -> Option { let part_type = self.data.get_part_type(&name); - if let Some(part_type) = part_type { - Some(PySR1PartType::new(part_type.clone())) - } else { - None - } + part_type.map(|part_type| PySR1PartType::new(part_type)) } }