Mercurial > public > mercurial-scm > hg
comparison rust/hg-cpython/src/revlog.rs @ 51207:72d16685d63a
rust-index: use the Rust index in `partialmatch`
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 02 Aug 2023 16:49:33 +0200 |
parents | 274abd1562a2 |
children | b8c89957a6b7 |
comparison
equal
deleted
inserted
replaced
51206:e9d47e2f5dcf | 51207:72d16685d63a |
---|---|
115 } | 115 } |
116 | 116 |
117 def partialmatch(&self, node: PyObject) -> PyResult<Option<PyBytes>> { | 117 def partialmatch(&self, node: PyObject) -> PyResult<Option<PyBytes>> { |
118 let opt = self.get_nodetree(py)?.borrow(); | 118 let opt = self.get_nodetree(py)?.borrow(); |
119 let nt = opt.as_ref().unwrap(); | 119 let nt = opt.as_ref().unwrap(); |
120 let idx = &*self.cindex(py).borrow(); | 120 let idx = &*self.index(py).borrow(); |
121 | 121 |
122 let node_as_string = if cfg!(feature = "python3-sys") { | 122 let node_as_string = if cfg!(feature = "python3-sys") { |
123 node.cast_as::<PyString>(py)?.to_string(py)?.to_string() | 123 node.cast_as::<PyString>(py)?.to_string(py)?.to_string() |
124 } | 124 } |
125 else { | 125 else { |