mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
TypeProtocol depends on AsPyObject
This commit is contained in:
@@ -473,7 +473,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub trait TypeProtocol {
|
||||
pub trait TypeProtocol: AsPyObject {
|
||||
fn class(&self) -> PyLease<'_, PyType>;
|
||||
|
||||
fn clone_class(&self) -> PyTypeRef {
|
||||
@@ -524,12 +524,6 @@ impl<T: PyObjectPayload> TypeProtocol for PyRef<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: TypeProtocol> TypeProtocol for &'_ T {
|
||||
fn class(&self) -> PyLease<'_, PyType> {
|
||||
(&**self).class()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, P> IntoPyRef<P> for T
|
||||
where
|
||||
P: PyValue + IntoPyObject + From<T>,
|
||||
|
||||
Reference in New Issue
Block a user