mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 15:47:26 +00:00
Python: Remove unused PyValueRef type
This commit is contained in:
parent
d4439231eb
commit
b1f0e5fe81
1 changed files with 0 additions and 12 deletions
|
@ -10,24 +10,12 @@ use std::collections::HashMap;
|
|||
|
||||
#[gen_stub_pyclass]
|
||||
pub struct PyValue(pub slint_interpreter::Value);
|
||||
struct PyValueRef<'a>(&'a slint_interpreter::Value);
|
||||
|
||||
impl<'py> IntoPyObject<'py> for PyValue {
|
||||
type Target = PyAny;
|
||||
type Output = Bound<'py, Self::Target>;
|
||||
type Error = PyErr;
|
||||
|
||||
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error> {
|
||||
// Share the conversion code below that operates on the reference
|
||||
PyValueRef(&self.0).into_pyobject(py)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'py> IntoPyObject<'py> for PyValueRef<'a> {
|
||||
type Target = PyAny;
|
||||
type Output = Bound<'py, Self::Target>;
|
||||
type Error = PyErr;
|
||||
|
||||
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error> {
|
||||
match &self.0 {
|
||||
slint_interpreter::Value::Void => ().into_bound_py_any(py),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue