# HG changeset patch # User Raphaël Gomès # Date 2023-01-09 17:00:56 # Node ID 321e2b7bc95c275fafdaec32896da8dec33db67f # Parent c8ef85ace21617496fdfc5667c644105567b6d27 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. 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 @@ -613,7 +613,7 @@ fn compare_value( // 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 @@ fn compare_value( (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()