diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs index 48dfc3b..f915ce6 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs @@ -21,7 +21,7 @@ fn get_version_str() -> String { #[pymodule] #[pyo3(name = "Difficult_Rocket_rs")] -fn module_init(_py: Python<'_>, m: &PyModule) -> PyResult<()> { +fn module_init(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_function(wrap_pyfunction!(get_version_str, m)?)?; m.add_function(wrap_pyfunction!(sr1_parse::part_list::read_part_list_py, m)?)?; m.add_function(wrap_pyfunction!(sr1_parse::ship::py_raw_ship_from_file, m)?)?; 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 6e4ad7c..a43caf7 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs @@ -8,4 +8,5 @@ pub mod console; pub mod data; +#[allow(unused)] pub mod editor; diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/python/data.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/python/data.rs index 47a41c9..516f2b1 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/python/data.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/python/data.rs @@ -5,7 +5,7 @@ use pyo3::prelude::*; use crate::dr_physics::math::{Point2D, Rotate}; use crate::sr1_parse::part_list::RawPartList; -use crate::sr1_parse::ship::{Connection, Connections, RawConnectionData, RawShip}; +use crate::sr1_parse::ship::{Connection, RawConnectionData, RawShip}; use crate::sr1_parse::SaveStatus; use crate::sr1_parse::{get_max_box, SR1PartData, SR1PartListTrait}; use crate::sr1_parse::{SR1PartList, SR1PartType, SR1Ship}; @@ -233,7 +233,7 @@ impl PySR1Connections { } /// 通过父子双方 id 获取连接 /// - /// 保险期间, 我还是返回一个 Vec + /// 保险起见, 我还是返回一个 Vec /// /// 万一真有 双/多 连接呢 fn search_by_both_id(&self, parent_id: IdType, child_id: IdType) -> Vec { diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/part_list.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/part_list.rs index b302f94..616dbca 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/part_list.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/part_list.rs @@ -386,6 +386,7 @@ impl RawPartList { Ok(part_list) } + #[allow(unused)] pub fn list_print(&self) { for part_data in self.part_types.iter() { println!("{:?}\n", part_data); diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/ship.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/ship.rs index 383f239..42f9fc1 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/ship.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_parse/data_structure/ship.rs @@ -269,6 +269,7 @@ impl RawShip { } } + #[allow(unused)] pub fn save(&self, file_name: String) -> Result<()> { let part_list_file = to_string(self)?; print!("{:?}", part_list_file);