rust-index: add a function to convert PyObject index for hg-core
Function in hg-core need something implementing the `Graph` trait. Right now, the `hg-cpython` entry points directly turn the PyObject passed as argument into a `cindex::Index`. However, if we start having the option to use an Index in Rust, we need to dispatch between the different possible PyObject we could receive. So move the "duplicate" call into a unified function. When time come. It will be easy to update the logic of all interface when the time come. Differential Revision: https://phab.mercurial-scm.org/D7653
Showing
- rust/hg-cpython/src/ancestors.rs 5 additions, 3 deletionsrust/hg-cpython/src/ancestors.rs
- rust/hg-cpython/src/dagops.rs 4 additions, 4 deletionsrust/hg-cpython/src/dagops.rs
- rust/hg-cpython/src/discovery.rs 3 additions, 1 deletionrust/hg-cpython/src/discovery.rs
- rust/hg-cpython/src/lib.rs 1 addition, 0 deletionsrust/hg-cpython/src/lib.rs
- rust/hg-cpython/src/revlog.rs 17 additions, 0 deletionsrust/hg-cpython/src/revlog.rs
rust/hg-cpython/src/revlog.rs
0 → 100644
Please register or sign in to comment