TypeProtocol depends on AsPyObject
@@ -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>,
