rust/hg-cpython/src/revlog.rs
changeset 51207 72d16685d63a
parent 51205 274abd1562a2
child 51208 b8c89957a6b7
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 {