fix: RawPartType not RawPartList and add .iter

This commit is contained in:
shenjack 2023-04-01 18:21:13 +08:00
parent 3bfcdd9feb
commit c928809a92
2 changed files with 2 additions and 2 deletions

View File

@ -326,7 +326,7 @@ pub mod part_list {
}
impl RawPartList {
pub fn new(parts: Vec<RawPart>) -> Self {
pub fn new(parts: Vec<RawPartType>) -> Self {
RawPartList { part_types: parts }
}

View File

@ -228,7 +228,7 @@ pub mod sr1 {
fn to_raw_part_list(&self) -> RawPartList {
let mut types: Vec<RawPartType> = 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)