impl AsRef<PyObjectRef> for PyRef<T>

This commit is contained in:
Jeong YunWon committed 2021-10-08 01:49:33 +09:00
1 parent 152cbc6b18
commit 055bad342b
1 file changed
+9
+9
View File
@@ -418,6 +418,15 @@ impl<T: PyObjectPayload> PyRef<T> {
}
}
impl<T> AsRef<PyObjectRef> for PyRef<T>
where
T: PyObjectPayload,
{
fn as_ref(&self) -> &PyObjectRef {
&self.obj
}
}
impl<T> Deref for PyRef<T>
where
T: PyObjectPayload,