##// END OF EJS Templates
copies-rust: implement PartialEqual manually...
marmoute -
r47324:b0a3ca02 default
parent child Browse files
Show More
@@ -16,7 +16,7 b' pub type PathCopies = HashMap<HgPathBuf,'
16
16
17 type PathToken = usize;
17 type PathToken = usize;
18
18
19 #[derive(Clone, Debug, PartialEq)]
19 #[derive(Clone, Debug)]
20 struct CopySource {
20 struct CopySource {
21 /// revision at which the copy information was added
21 /// revision at which the copy information was added
22 rev: Revision,
22 rev: Revision,
@@ -93,6 +93,21 b' impl CopySource {'
93 }
93 }
94 }
94 }
95
95
96 // For the same "dest", content generated for a given revision will always be
97 // the same.
98 impl PartialEq for CopySource {
99 fn eq(&self, other: &Self) -> bool {
100 #[cfg(debug_assertions)]
101 {
102 if self.rev == other.rev {
103 debug_assert!(self.path == other.path);
104 debug_assert!(self.overwritten == other.overwritten);
105 }
106 }
107 self.rev == other.rev
108 }
109 }
110
96 /// maps CopyDestination to Copy Source (+ a "timestamp" for the operation)
111 /// maps CopyDestination to Copy Source (+ a "timestamp" for the operation)
97 type InternalPathCopies = OrdMap<PathToken, CopySource>;
112 type InternalPathCopies = OrdMap<PathToken, CopySource>;
98
113
General Comments 0
You need to be logged in to leave comments. Login now