diff -r e88549a02f5e -r 33fe96a5c522 rust/hg-cpython/src/dagops.rs --- a/rust/hg-cpython/src/dagops.rs Tue Oct 15 22:02:34 2019 -0400 +++ b/rust/hg-cpython/src/dagops.rs Mon Sep 30 16:31:53 2019 -0400 @@ -10,9 +10,7 @@ //! //! From Python, this will be seen as `mercurial.rustext.dagop` use crate::{ - cindex::Index, - conversion::{py_set, rev_pyiter_collect}, - exceptions::GraphError, + cindex::Index, conversion::rev_pyiter_collect, exceptions::GraphError, }; use cpython::{PyDict, PyModule, PyObject, PyResult, Python}; use hg::dagops; @@ -26,11 +24,11 @@ py: Python, index: PyObject, revs: PyObject, -) -> PyResult { +) -> PyResult> { let mut as_set: HashSet = rev_pyiter_collect(py, &revs)?; dagops::retain_heads(&Index::new(py, index)?, &mut as_set) .map_err(|e| GraphError::pynew(py, e))?; - py_set(py, &as_set) + Ok(as_set) } /// Create the module, with `__package__` given from parent