From c9b2c7b14a534ab2c2c22bd36a32cca462601726 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Mon, 23 Jan 2023 23:50:21 +0800 Subject: [PATCH] =?UTF-8?q?rustc=20=E7=9A=84=E6=8F=90=E7=A4=BA=E4=B9=9F?= =?UTF-8?q?=E4=B8=8D=E9=94=99=20[docs=20skip]=20[build=20skip]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Difficult_Rocket_rs/src/src/sr1_render.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/Difficult_Rocket_rs/src/src/sr1_render.rs b/libs/Difficult_Rocket_rs/src/src/sr1_render.rs index 3b5eb22..b2cfee8 100644 --- a/libs/Difficult_Rocket_rs/src/src/sr1_render.rs +++ b/libs/Difficult_Rocket_rs/src/src/sr1_render.rs @@ -16,7 +16,6 @@ pub mod types { use std::collections::HashMap; use pyo3::intern; use pyo3::prelude::*; - use pyo3::types::iter::PyDictIterator; use pyo3::types::PyDict; pub struct SR1PartData { @@ -51,7 +50,8 @@ pub mod types { impl PartDatas { #[new] pub fn py_new(py_part_data: &PyDict) -> PyResult{ - let mut + let mut datas: HashMap = HashMap::with_capacity(py_part_data.len()); + return Ok(PartDatas{part_structs: datas}) } } @@ -85,8 +85,9 @@ pub mod types { pub fn point_dict_from_part_datas(input: &PyDict) -> Result, PyErr> { let mut result: HashMap = HashMap::with_capacity(input.len()); - for key in &input.iter() { - key[] + for key in input.iter() { + println!("aaa"); + // key[] } return Ok(result); }