diff --git a/rust/hg-core/src/copy_tracing.rs b/rust/hg-core/src/copy_tracing.rs --- a/rust/hg-core/src/copy_tracing.rs +++ b/rust/hg-core/src/copy_tracing.rs @@ -12,17 +12,19 @@ pub type PathCopies = HashMap; +type PathToken = HgPathBuf; + #[derive(Clone, Debug, PartialEq)] struct TimeStampedPathCopy { /// revision at which the copy information was added rev: Revision, /// the copy source, (Set to None in case of deletion of the associated /// key) - path: Option, + path: Option, } /// maps CopyDestination to Copy Source (+ a "timestamp" for the operation) -type TimeStampedPathCopies = OrdMap; +type TimeStampedPathCopies = OrdMap; /// hold parent 1, parent 2 and relevant files actions. pub type RevInfo<'a> = (Revision, Revision, ChangedFiles<'a>); @@ -506,7 +508,7 @@ // actively working on this code. Feel free to re-inline it once this // code is more settled. let mut cmp_value = - |dest: &HgPathBuf, + |dest: &PathToken, src_minor: &TimeStampedPathCopy, src_major: &TimeStampedPathCopy| { compare_value(changes, oracle, dest, src_minor, src_major) @@ -564,10 +566,10 @@ let mut override_minor = Vec::new(); let mut override_major = Vec::new(); - let mut to_major = |k: &HgPathBuf, v: &TimeStampedPathCopy| { + let mut to_major = |k: &PathToken, v: &TimeStampedPathCopy| { override_major.push((k.clone(), v.clone())) }; - let mut to_minor = |k: &HgPathBuf, v: &TimeStampedPathCopy| { + let mut to_minor = |k: &PathToken, v: &TimeStampedPathCopy| { override_minor.push((k.clone(), v.clone())) }; @@ -641,7 +643,7 @@ fn compare_value bool>( changes: &ChangedFiles, oracle: &mut AncestorOracle, - dest: &HgPathBuf, + dest: &PathToken, src_minor: &TimeStampedPathCopy, src_major: &TimeStampedPathCopy, ) -> MergePick {