From c928809a92735aa77a596488eb1fc669a1ae5fc0 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 1 Apr 2023 18:21:13 +0800 Subject: [PATCH] fix: RawPartType not RawPartList and add .iter --- libs/Difficult_Rocket_rs/src/src/sr1_data.rs | 2 +- libs/Difficult_Rocket_rs/src/src/types.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/Difficult_Rocket_rs/src/src/sr1_data.rs b/libs/Difficult_Rocket_rs/src/src/sr1_data.rs index 15b3ecf..a2edc80 100644 --- a/libs/Difficult_Rocket_rs/src/src/sr1_data.rs +++ b/libs/Difficult_Rocket_rs/src/src/sr1_data.rs @@ -326,7 +326,7 @@ pub mod part_list { } impl RawPartList { - pub fn new(parts: Vec) -> Self { + pub fn new(parts: Vec) -> Self { RawPartList { part_types: parts } } diff --git a/libs/Difficult_Rocket_rs/src/src/types.rs b/libs/Difficult_Rocket_rs/src/src/types.rs index 8d64d65..77acc74 100644 --- a/libs/Difficult_Rocket_rs/src/src/types.rs +++ b/libs/Difficult_Rocket_rs/src/src/types.rs @@ -228,7 +228,7 @@ pub mod sr1 { fn to_raw_part_list(&self) -> RawPartList { let mut types: Vec = Vec::new(); - for part_type in self.types { + for part_type in self.types.iter() { types.insert(0, part_type.to_raw_part_type()); } RawPartList::new(types)