rust/hg-cpython/src/revlog.rs
changeset 43945 f98f0e3ddaa1
child 43961 b69d5f3a41d0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rust/hg-cpython/src/revlog.rs	Fri Dec 13 19:59:59 2019 +0100
@@ -0,0 +1,17 @@
+// revlog.rs
+//
+// Copyright 2019 Georges Racinet <georges.racinet@octobus.net>
+//
+// This software may be used and distributed according to the terms of the
+// GNU General Public License version 2 or any later version.
+
+use crate::cindex;
+use cpython::{PyObject, PyResult, Python};
+
+/// Return a Struct implementing the Graph trait
+pub(crate) fn pyindex_to_graph(
+    py: Python,
+    index: PyObject,
+) -> PyResult<cindex::Index> {
+    cindex::Index::new(py, index)
+}