Mercurial > public > mercurial-scm > hg
diff rust/hg-cpython/src/ref_sharing.rs @ 43180:b3dda04e851b
rust-cpython: drop self.borrow_mut() in favor of PySharedRef wrapper
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 15 Sep 2019 17:02:31 +0900 |
parents | 7d6758f2d50c |
children | 00222775d59b |
line wrap: on
line diff
--- a/rust/hg-cpython/src/ref_sharing.rs Sun Sep 15 16:59:50 2019 +0900 +++ b/rust/hg-cpython/src/ref_sharing.rs Sun Sep 15 17:02:31 2019 +0900 @@ -310,15 +310,6 @@ let data = self.$data_member(py); unsafe { PySharedRef::new(py, owner, data) } } - - // TODO: remove this function in favor of $shared_accessor(py) - fn borrow_mut<'a>( - &'a self, - py: Python<'a>, - ) -> PyResult<crate::ref_sharing::PyRefMut<'a, $inner_struct>> - { - self.$shared_accessor(py).borrow_mut() - } } }; }