Show More
@@ -74,9 +74,15 b' py_class!(pub class MixedIndex |py| {' | |||||
74 | let opt = self.get_nodetree(py)?.borrow(); |
|
74 | let opt = self.get_nodetree(py)?.borrow(); | |
75 | let nt = opt.as_ref().unwrap(); |
|
75 | let nt = opt.as_ref().unwrap(); | |
76 | let idx = &*self.cindex(py).borrow(); |
|
76 | let idx = &*self.cindex(py).borrow(); | |
|
77 | let ridx = &*self.index(py).borrow(); | |||
77 | let node = node_from_py_bytes(py, &node)?; |
|
78 | let node = node_from_py_bytes(py, &node)?; | |
78 | let res = nt.find_bin(idx, node.into()); |
|
79 | let rust_rev = | |
79 |
|
|
80 | nt.find_bin(ridx, node.into()).map_err(|e| nodemap_error(py, e))?; | |
|
81 | let c_rev = | |||
|
82 | nt.find_bin(idx, node.into()).map_err(|e| nodemap_error(py, e))?; | |||
|
83 | assert_eq!(rust_rev, c_rev); | |||
|
84 | Ok(rust_rev.map(Into::into)) | |||
|
85 | ||||
80 | } |
|
86 | } | |
81 |
|
87 | |||
82 | /// same as `get_rev()` but raises a bare `error.RevlogError` if node |
|
88 | /// same as `get_rev()` but raises a bare `error.RevlogError` if node |
General Comments 0
You need to be logged in to leave comments.
Login now