conflicts: replace "if let" with "let else"

This makes the code a bit easier to follow in my opinion.
This commit is contained in:
Scott Taylor 2024-11-16 11:23:48 -06:00 committed by Scott Taylor
parent e5cb9f94f6
commit 3c182687e8

View file

@ -300,9 +300,7 @@ fn materialize_conflict_hunks(
format!("base #{}", base_index + 1) format!("base #{}", base_index + 1)
}; };
let right1 = if let Some(right1) = hunk.get_add(add_index) { let Some(right1) = hunk.get_add(add_index) else {
right1
} else {
// If we have no more positive terms, emit the remaining negative // If we have no more positive terms, emit the remaining negative
// terms as snapshots. // terms as snapshots.
output.write_all(CONFLICT_MINUS_LINE)?; output.write_all(CONFLICT_MINUS_LINE)?;