This commit is contained in:
shenjack 2023-08-15 23:30:25 +08:00
parent 8dfa5b230a
commit 6fefb4460b
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -51,6 +51,10 @@ pub mod data {
pub data: SR1PartType, pub data: SR1PartType,
} }
impl PySR1PartType {
pub fn new(data: SR1PartType) -> Self { Self { data } }
}
#[pymethods] #[pymethods]
impl PySR1PartType { impl PySR1PartType {
#[getter] #[getter]
@ -81,10 +85,6 @@ pub mod data {
fn get_type(&self) -> String { self.data.p_type.into() } fn get_type(&self) -> String { self.data.p_type.into() }
} }
impl PySR1PartType {
pub fn new(data: SR1PartType) -> Self { Self { data } }
}
#[pyclass] #[pyclass]
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
#[pyo3(name = "SR1PartList_rs")] #[pyo3(name = "SR1PartList_rs")]