This commit is contained in:
shenjack 2023-07-02 01:48:31 +08:00
parent c1bdda5f03
commit 5958a14d47
2 changed files with 3 additions and 7 deletions

View File

@ -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

View File

@ -97,11 +97,7 @@ pub mod data {
fn get_part_type(&self, name: String) -> Option<PySR1PartType> {
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))
}
}