diff -r d8ac62374943 -r cd8ca38fccff rust/hg-core/src/dirstate_tree/dispatch.rs --- a/rust/hg-core/src/dirstate_tree/dispatch.rs Fri Apr 30 18:24:54 2021 +0200 +++ b/rust/hg-core/src/dirstate_tree/dispatch.rs Fri Apr 30 19:57:46 2021 +0200 @@ -47,21 +47,21 @@ fn non_normal_or_other_parent_paths( &mut self, - ) -> Box + '_>; + ) -> Box + '_>; fn set_non_normal_other_parent_entries(&mut self, force: bool); fn iter_non_normal_paths( &mut self, - ) -> Box + Send + '_>; + ) -> Box + Send + '_>; fn iter_non_normal_paths_panic( &self, - ) -> Box + Send + '_>; + ) -> Box + Send + '_>; fn iter_other_parent_paths( &mut self, - ) -> Box + Send + '_>; + ) -> Box + Send + '_>; fn has_tracked_dir( &mut self, @@ -97,7 +97,7 @@ fn copy_map_contains_key(&self, key: &HgPath) -> bool; - fn copy_map_get(&self, key: &HgPath) -> Option<&HgPathBuf>; + fn copy_map_get(&self, key: &HgPath) -> Option<&HgPath>; fn copy_map_remove(&mut self, key: &HgPath) -> Option; @@ -163,10 +163,10 @@ fn non_normal_or_other_parent_paths( &mut self, - ) -> Box + '_> { + ) -> Box + '_> { let (non_normal, other_parent) = self.get_non_normal_other_parent_entries(); - Box::new(non_normal.union(other_parent)) + Box::new(non_normal.union(other_parent).map(|p| &**p)) } fn set_non_normal_other_parent_entries(&mut self, force: bool) { @@ -175,26 +175,26 @@ fn iter_non_normal_paths( &mut self, - ) -> Box + Send + '_> { + ) -> Box + Send + '_> { let (non_normal, _other_parent) = self.get_non_normal_other_parent_entries(); - Box::new(non_normal.iter()) + Box::new(non_normal.iter().map(|p| &**p)) } fn iter_non_normal_paths_panic( &self, - ) -> Box + Send + '_> { + ) -> Box + Send + '_> { let (non_normal, _other_parent) = self.get_non_normal_other_parent_entries_panic(); - Box::new(non_normal.iter()) + Box::new(non_normal.iter().map(|p| &**p)) } fn iter_other_parent_paths( &mut self, - ) -> Box + Send + '_> { + ) -> Box + Send + '_> { let (_non_normal, other_parent) = self.get_non_normal_other_parent_entries(); - Box::new(other_parent.iter()) + Box::new(other_parent.iter().map(|p| &**p)) } fn has_tracked_dir( @@ -243,15 +243,15 @@ } fn copy_map_iter(&self) -> CopyMapIter<'_> { - Box::new(self.copy_map.iter()) + Box::new(self.copy_map.iter().map(|(key, value)| (&**key, &**value))) } fn copy_map_contains_key(&self, key: &HgPath) -> bool { self.copy_map.contains_key(key) } - fn copy_map_get(&self, key: &HgPath) -> Option<&HgPathBuf> { - self.copy_map.get(key) + fn copy_map_get(&self, key: &HgPath) -> Option<&HgPath> { + self.copy_map.get(key).map(|p| &**p) } fn copy_map_remove(&mut self, key: &HgPath) -> Option { @@ -279,6 +279,6 @@ } fn iter(&self) -> StateMapIter<'_> { - Box::new((&**self).iter()) + Box::new((&**self).iter().map(|(key, value)| (&**key, value))) } }