diff --git a/vm/src/pyobject.rs b/vm/src/pyobject.rs index f3f40ddbd..954cf5b3a 100644 --- a/vm/src/pyobject.rs +++ b/vm/src/pyobject.rs @@ -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 TypeProtocol for PyRef { } } -impl TypeProtocol for &'_ T { - fn class(&self) -> PyLease<'_, PyType> { - (&**self).class() - } -} - impl IntoPyRef

for T where P: PyValue + IntoPyObject + From,