Mercurial > hg
diff rust/hg-cpython/src/dirstate/dirs_multiset.rs @ 43430:8418b77132c1
rust-cpython: remove useless PyResult<> from leak_immutable()
The caller should know if the shared data is mutably borrowed or not.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 05 Oct 2019 09:33:01 -0400 |
parents | b9f791090211 |
children | 1fe2e574616e |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirs_multiset.rs Sat Oct 05 09:01:25 2019 -0400 +++ b/rust/hg-cpython/src/dirstate/dirs_multiset.rs Sat Oct 05 09:33:01 2019 -0400 @@ -92,7 +92,7 @@ }) } def __iter__(&self) -> PyResult<DirsMultisetKeysIterator> { - let leaked_ref = self.inner_shared(py).leak_immutable()?; + let leaked_ref = self.inner_shared(py).leak_immutable(); DirsMultisetKeysIterator::from_inner( py, unsafe { leaked_ref.map(py, |o| o.iter()) },