Comments
Patch
@@ -16,7 +16,7 @@
type PathToken = usize;
-#[derive(Clone, Debug, PartialEq)]
+#[derive(Clone, Debug)]
struct CopySource {
/// revision at which the copy information was added
rev: Revision,
@@ -91,6 +91,21 @@
}
}
+// For the same "dest", content generated for a given revision will always be
+// the same.
+impl PartialEq for CopySource {
+ fn eq(&self, other: &Self) -> bool {
+ #[cfg(debug_assertions)]
+ {
+ if self.rev == other.rev {
+ debug_assert!(self.path == other.path);
+ debug_assert!(self.overwritten == other.overwritten);
+ }
+ }
+ self.rev == other.rev
+ }
+}
+
/// maps CopyDestination to Copy Source (+ a "timestamp" for the operation)
type InternalPathCopies = OrdMap<PathToken, CopySource>;