rust/hg-cpython/src/dirstate/non_normal_entries.rs
changeset 47094 e061a1df32a8
parent 44973 26114bd6ec60
child 47124 cd8ca38fccff
--- a/rust/hg-cpython/src/dirstate/non_normal_entries.rs	Tue Mar 30 14:15:23 2021 +0200
+++ b/rust/hg-cpython/src/dirstate/non_normal_entries.rs	Thu Apr 08 14:58:44 2021 +0200
@@ -7,14 +7,13 @@
 
 use cpython::{
     exc::NotImplementedError, CompareOp, ObjectProtocol, PyBytes, PyClone,
-    PyErr, PyList, PyObject, PyResult, PyString, Python, PythonObject,
-    ToPyObject, UnsafePyLeaked,
+    PyErr, PyObject, PyResult, PyString, Python, PythonObject, ToPyObject,
+    UnsafePyLeaked,
 };
 
 use crate::dirstate::DirstateMap;
 use hg::utils::hg_path::HgPathBuf;
 use std::cell::RefCell;
-use std::collections::hash_set;
 
 py_class!(pub class NonNormalEntries |py| {
     data dmap: DirstateMap;
@@ -25,9 +24,6 @@
     def remove(&self, key: PyObject) -> PyResult<PyObject> {
         self.dmap(py).non_normal_entries_remove(py, key)
     }
-    def union(&self, other: PyObject) -> PyResult<PyList> {
-        self.dmap(py).non_normal_entries_union(py, other)
-    }
     def __richcmp__(&self, other: PyObject, op: CompareOp) -> PyResult<bool> {
         match op {
             CompareOp::Eq => self.is_equal_to(py, other),
@@ -66,7 +62,8 @@
     }
 }
 
-type NonNormalEntriesIter<'a> = hash_set::Iter<'a, HgPathBuf>;
+type NonNormalEntriesIter<'a> =
+    Box<dyn Iterator<Item = &'a HgPathBuf> + Send + 'a>;
 
 py_shared_iterator!(
     NonNormalEntriesIterator,