rust/hg-core/src/dirstate/dirs_multiset.rs
branchstable
changeset 51570 b39057b713b1
parent 50860 f50e71fdfcb4
equal deleted inserted replaced
51569:b32c3146ec34 51570:b39057b713b1
   156     inner: FastHashMap<&'a HgPath, HashSet<&'a HgPath>>,
   156     inner: FastHashMap<&'a HgPath, HashSet<&'a HgPath>>,
   157     only_include: Option<HashSet<&'a HgPath>>,
   157     only_include: Option<HashSet<&'a HgPath>>,
   158 }
   158 }
   159 
   159 
   160 impl<'a> DirsChildrenMultiset<'a> {
   160 impl<'a> DirsChildrenMultiset<'a> {
   161     pub fn new(
   161     pub fn new<I: Iterator<Item = &'a HgPathBuf>>(
   162         paths: impl Iterator<Item = &'a HgPathBuf>,
   162         paths: impl Iterator<Item = &'a HgPathBuf>,
   163         only_include: Option<&'a HashSet<impl AsRef<HgPath> + 'a>>,
   163         only_include: Option<I>,
   164     ) -> Self {
   164     ) -> Self {
   165         let mut new = Self {
   165         let mut new = Self {
   166             inner: HashMap::default(),
   166             inner: HashMap::default(),
   167             only_include: only_include
   167             only_include: only_include.map(|s| s.map(AsRef::as_ref).collect()),
   168                 .map(|s| s.iter().map(AsRef::as_ref).collect()),
       
   169         };
   168         };
   170 
   169 
   171         for path in paths {
   170         for path in paths {
   172             new.add_path(path)
   171             new.add_path(path)
   173         }
   172         }