##// END OF EJS Templates
revlog: run rustfmt nightly...
Augie Fackler -
r44527:451d2217 default
parent child Browse files
Show More
@@ -7,14 +7,17 b''
7
7
8 use crate::cindex;
8 use crate::cindex;
9 use cpython::{
9 use cpython::{
10 ObjectProtocol, PyClone, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, PythonObject,
10 ObjectProtocol, PyClone, PyDict, PyModule, PyObject, PyResult, PyTuple,
11 ToPyObject,
11 Python, PythonObject, ToPyObject,
12 };
12 };
13 use hg::Revision;
13 use hg::Revision;
14 use std::cell::RefCell;
14 use std::cell::RefCell;
15
15
16 /// Return a Struct implementing the Graph trait
16 /// Return a Struct implementing the Graph trait
17 pub(crate) fn pyindex_to_graph(py: Python, index: PyObject) -> PyResult<cindex::Index> {
17 pub(crate) fn pyindex_to_graph(
18 py: Python,
19 index: PyObject,
20 ) -> PyResult<cindex::Index> {
18 match index.extract::<MixedIndex>(py) {
21 match index.extract::<MixedIndex>(py) {
19 Ok(midx) => Ok(midx.clone_cindex(py)),
22 Ok(midx) => Ok(midx.clone_cindex(py)),
20 Err(_) => cindex::Index::new(py, index),
23 Err(_) => cindex::Index::new(py, index),
General Comments 0
You need to be logged in to leave comments. Login now