rust/hg-core/src/dirstate/dirs_multiset.rs
branchstable
changeset 51570 b39057b713b1
parent 50860 f50e71fdfcb4
--- a/rust/hg-core/src/dirstate/dirs_multiset.rs	Fri Apr 12 15:39:21 2024 +0100
+++ b/rust/hg-core/src/dirstate/dirs_multiset.rs	Fri Apr 12 16:09:45 2024 +0100
@@ -158,14 +158,13 @@
 }
 
 impl<'a> DirsChildrenMultiset<'a> {
-    pub fn new(
+    pub fn new<I: Iterator<Item = &'a HgPathBuf>>(
         paths: impl Iterator<Item = &'a HgPathBuf>,
-        only_include: Option<&'a HashSet<impl AsRef<HgPath> + 'a>>,
+        only_include: Option<I>,
     ) -> Self {
         let mut new = Self {
             inner: HashMap::default(),
-            only_include: only_include
-                .map(|s| s.iter().map(AsRef::as_ref).collect()),
+            only_include: only_include.map(|s| s.map(AsRef::as_ref).collect()),
         };
 
         for path in paths {