parent
4adb257cba
commit
1d5df1bffe
|
@ -449,7 +449,7 @@ impl<T: PyClass> PyCell<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn _borrow_unchecked_unguarded(&self) -> &T {
|
||||
pub(crate) unsafe fn immutable_pyclass_try_borrow_unchecked_unguarded(&self) -> &T {
|
||||
&*self.contents.value.get()
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ pub unsafe trait PyClass:
|
|||
/// by wrapping `PyCell::immutable_pyclass_try_borrow_unguarded()`.
|
||||
#[inline]
|
||||
unsafe fn try_borrow_unguarded(slf: &PyCell<Self>) -> Result<&Self, PyBorrowError> {
|
||||
Ok(PyCell::_borrow_unchecked_unguarded(slf))
|
||||
Ok(PyCell::_try_borrow_unchecked_unguarded(slf))
|
||||
}
|
||||
|
||||
/// Default implementation that does nothing.
|
||||
|
|
Loading…
Reference in a new issue