Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-cpython/src/revlog.rs @ 49987:58074252db3c
rust: run `cargo clippy`
These automatic fixes are good to have because they make the code
more idiomatic and less surprising.
The transform from `sort` -> `sort_unstable` is questionable, but this is
only in a test, so it doesn't matter in our case.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 09 Jan 2023 17:40:03 +0100 |
parents | 455fce57e89e |
children | 1928b770e3e7 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/revlog.rs Fri Jan 06 18:52:04 2023 +0100 +++ b/rust/hg-cpython/src/revlog.rs Mon Jan 09 17:40:03 2023 +0100 @@ -144,9 +144,9 @@ // __delitem__ is both for `del idx[r]` and `del idx[r1:r2]` self.cindex(py).borrow().inner().del_item(py, key)?; let mut opt = self.get_nodetree(py)?.borrow_mut(); - let mut nt = opt.as_mut().unwrap(); + let nt = opt.as_mut().unwrap(); nt.invalidate_all(); - self.fill_nodemap(py, &mut nt)?; + self.fill_nodemap(py, nt)?; Ok(()) }