Mercurial > public > mercurial-scm > hg
comparison rust/hg-cpython/src/revlog.rs @ 49914: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 |
comparison
equal
deleted
inserted
replaced
49913:c15b415d1bff | 49914:58074252db3c |
---|---|
142 | 142 |
143 def __delitem__(&self, key: PyObject) -> PyResult<()> { | 143 def __delitem__(&self, key: PyObject) -> PyResult<()> { |
144 // __delitem__ is both for `del idx[r]` and `del idx[r1:r2]` | 144 // __delitem__ is both for `del idx[r]` and `del idx[r1:r2]` |
145 self.cindex(py).borrow().inner().del_item(py, key)?; | 145 self.cindex(py).borrow().inner().del_item(py, key)?; |
146 let mut opt = self.get_nodetree(py)?.borrow_mut(); | 146 let mut opt = self.get_nodetree(py)?.borrow_mut(); |
147 let mut nt = opt.as_mut().unwrap(); | 147 let nt = opt.as_mut().unwrap(); |
148 nt.invalidate_all(); | 148 nt.invalidate_all(); |
149 self.fill_nodemap(py, &mut nt)?; | 149 self.fill_nodemap(py, nt)?; |
150 Ok(()) | 150 Ok(()) |
151 } | 151 } |
152 | 152 |
153 // | 153 // |
154 // Reforwarded C index API | 154 // Reforwarded C index API |