Mercurial > hg
diff rust/hg-cpython/src/dirstate/dirstate_map.rs @ 42802:2e1f74cc3350
rust-dirstate: split DirsMultiset constructor per input type
Since skip_state only applies to dirstate, it doesn't make sense to unify
these constructors and dispatch by enum.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 17 Aug 2019 18:25:29 +0900 |
parents | 1a535313ad1b |
children | 01d3ce3281cf |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Sat Aug 17 16:33:05 2019 +0900 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Sat Aug 17 18:25:29 2019 +0900 @@ -24,7 +24,7 @@ ref_sharing::PySharedState, }; use hg::{ - DirsIterable, DirsMultiset, DirstateEntry, DirstateMap as RustDirstateMap, + DirsMultiset, DirstateEntry, DirstateMap as RustDirstateMap, DirstateParents, DirstateParseError, EntryState, PARENT_SIZE, }; @@ -356,8 +356,8 @@ self.inner(py).borrow_mut().set_dirs(); Dirs::from_inner( py, - DirsMultiset::new( - DirsIterable::Dirstate(&self.inner(py).borrow()), + DirsMultiset::from_dirstate( + &self.inner(py).borrow(), Some(EntryState::Removed), ), ) @@ -367,8 +367,8 @@ self.inner(py).borrow_mut().set_all_dirs(); Dirs::from_inner( py, - DirsMultiset::new( - DirsIterable::Dirstate(&self.inner(py).borrow()), + DirsMultiset::from_dirstate( + &self.inner(py).borrow(), None, ), )