From 5f19db607c56f25a5df471a72b3b2862f1823873 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Wed, 10 May 2023 18:39:42 +0800 Subject: [PATCH] add .to_owned() --- mods/dr_game/Difficult_Rocket_rs/src/src/python.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 4c49275..c7d52e9 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/python.rs @@ -28,7 +28,7 @@ pub mod data { fn get_name(&self) -> String { self.data.name.clone() } #[getter] - fn get_mass(&self) -> f64 { self.data.mass } + fn get_mass(&self) -> f64 { self.data.mass.to_owned() } } impl PySR1PartType { @@ -101,9 +101,9 @@ pub mod data { fn get_description(&self) -> String { self.ship.description.clone() } - fn get_lift_off(&self) -> bool { self.ship.lift_off } + fn get_lift_off(&self) -> bool { self.ship.lift_off.to_owned() } - fn get_touch_ground(&self) -> bool { self.ship.touch_ground } + fn get_touch_ground(&self) -> bool { self.ship.touch_ground.to_owned() } } }