diff -r 1b2200bd06b6 -r 7d6758f2d50c rust/hg-cpython/src/ref_sharing.rs --- a/rust/hg-cpython/src/ref_sharing.rs Sun Sep 15 16:50:48 2019 +0900 +++ b/rust/hg-cpython/src/ref_sharing.rs Sun Sep 15 16:59:50 2019 +0900 @@ -319,14 +319,6 @@ { self.$shared_accessor(py).borrow_mut() } - - // TODO: remove this function in favor of $shared_accessor(py) - unsafe fn leak_immutable<'a>( - &'a self, - py: Python<'a>, - ) -> PyResult<(PyLeakedRef, &'static $inner_struct)> { - self.$shared_accessor(py).leak_immutable() - } } }; } @@ -396,7 +388,8 @@ /// data inner: PySharedRefCell; /// /// def __iter__(&self) -> PyResult { -/// let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; +/// let (leak_handle, leaked_ref) = +/// unsafe { self.inner_shared(py).leak_immutable()? }; /// MyTypeItemsIterator::from_inner( /// py, /// leak_handle,