Mercurial > hg
diff rust/hg-cpython/src/ancestors.rs @ 51272:c4cbb515b006
rust-clippy: apply some more trivial fixes
All of these were hinted at by clippy and make the code simpler.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 20 Dec 2023 14:59:31 +0100 |
parents | 24d3298189d7 |
children | 771598067be2 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/ancestors.rs Wed Dec 20 14:58:36 2023 +0100 +++ b/rust/hg-cpython/src/ancestors.rs Wed Dec 20 14:59:31 2023 +0100 @@ -177,7 +177,7 @@ let inner: &RefCell<VCGLazyAncestors<PySharedIndex>> = &*unsafe { leaked.try_borrow(py)? }; let inner_mut: &mut VCGLazyAncestors<PySharedIndex> = - &mut *inner.borrow_mut(); + &mut inner.borrow_mut(); inner_mut.contains(rev.0) .map_err(|e| GraphError::pynew_from_vcsgraph(py, e)) } @@ -335,7 +335,7 @@ self.index(py).clone_ref(py))?; // Safety: we don't leak the "faked" reference out of `UnsafePyLeaked` let index = &*unsafe { leaked.try_borrow(py)? }; - rev_pyiter_collect(py, &revs, &*index)? + rev_pyiter_collect(py, &revs, index)? }; let mut leaked = self.inner(py).borrow_mut();