From 7f9e8254c4669b53a66d760953b3e0da6121e328 Mon Sep 17 00:00:00 2001 From: Jeong Yunwon Date: Sun, 17 Apr 2022 19:12:58 +0900 Subject: [PATCH] TypeProtocol depends on AsPyObject --- vm/src/pyobject.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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,