From 0a1a6adce1e7d201d6dc59a0c2b22037fba4854f Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 22 Dec 2023 00:04:31 +0800 Subject: [PATCH] Remove | unuse import --- mods/dr_game/Difficult_Rocket_rs/src/src/simulator.rs | 2 +- mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data/ship.rs | 5 +---- mods/dr_game/Difficult_Rocket_rs/src/src/xml_reader.rs | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/simulator.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/simulator.rs index 1784fc6..c081474 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/simulator.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/simulator.rs @@ -11,7 +11,7 @@ use rapier2d_f64::prelude::*; #[pyfunction] #[pyo3(name = "simulation")] -pub fn simulation() -> () { +pub fn simulation() { let mut rigid_body_set = RigidBodySet::new(); let mut collider_set = ColliderSet::new(); diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data/ship.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data/ship.rs index d351c32..a2a95cf 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data/ship.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/sr1_data/ship.rs @@ -1,4 +1,3 @@ -use std::error::Error; use std::fs; use pyo3::prelude::*; @@ -7,10 +6,8 @@ use serde::{Deserialize, Serialize}; use serde_xml_rs::from_str; use serde_xml_rs::Error as XmlError; -use super::part_list::SR1PartTypeEnum; - use crate::data_type::sr1::{IdType, SR1PartData, SR1PartDataAttr, SR1Ship}; -use crate::data_type::sr1::{SR1PartDataTrait, SR1PartTypeAttr, SR1ShipTrait}; +use crate::data_type::sr1::{SR1PartDataTrait, SR1ShipTrait}; #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(rename = "Ship")] diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/xml_reader.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/xml_reader.rs index 452c2b0..af3a63b 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/xml_reader.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/xml_reader.rs @@ -1,7 +1,6 @@ use std::io; use fs_err as fs; -use xml::reader::*; // Input the directory of the xml file. // If file does not exsit or not the XML file, return errors or return file handle.