changeset 49989:321e2b7bc95c

rust: fix broken debug assertions These were caught by `clippy`. It appears no one uses the debug builds, which is how this wasn't caught before.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 18:00:56 +0100
parents c8ef85ace216
children 4c71c215bcfe
files rust/hg-core/src/copy_tracing.rs
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/copy_tracing.rs	Mon Jan 09 17:48:54 2023 +0100
+++ b/rust/hg-core/src/copy_tracing.rs	Mon Jan 09 18:00:56 2023 +0100
@@ -613,7 +613,7 @@
         // eventually.
         (MergePick::Minor, true)
     } else if src_major.path == src_minor.path {
-        debug_assert!(src_major.rev != src_major.rev);
+        debug_assert!(src_major.rev != src_minor.rev);
         // we have the same value, but from other source;
         if src_major.is_overwritten_by(src_minor) {
             (MergePick::Minor, false)
@@ -623,7 +623,7 @@
             (MergePick::Any, true)
         }
     } else {
-        debug_assert!(src_major.rev != src_major.rev);
+        debug_assert!(src_major.rev != src_minor.rev);
         let action = merge_case_for_dest();
         if src_minor.path.is_some()
             && src_major.path.is_none()