forked from Rust-related/RustPython
impl AsRef<PyObjectRef> for PyRef<T>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user