changeset 51208:274abd1562a2

rust-index: use the rust index in `shortest`
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 02 Aug 2023 16:49:17 +0200
parents b67cd0d0e976
children e9d47e2f5dcf
files rust/hg-cpython/src/revlog.rs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-cpython/src/revlog.rs	Wed Aug 02 14:34:21 2023 +0200
+++ b/rust/hg-cpython/src/revlog.rs	Wed Aug 02 16:49:17 2023 +0200
@@ -105,7 +105,7 @@
     def shortest(&self, node: PyBytes) -> PyResult<usize> {
         let opt = self.get_nodetree(py)?.borrow();
         let nt = opt.as_ref().unwrap();
-        let idx = &*self.cindex(py).borrow();
+        let idx = &*self.index(py).borrow();
         match nt.unique_prefix_len_node(idx, &node_from_py_bytes(py, &node)?)
         {
             Ok(Some(l)) => Ok(l),