From 3c182687e88f7343f623b8aa4558ecaf87e4d9ae Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 16 Nov 2024 11:23:48 -0600 Subject: [PATCH] conflicts: replace "if let" with "let else" This makes the code a bit easier to follow in my opinion. --- lib/src/conflicts.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/src/conflicts.rs b/lib/src/conflicts.rs index 287bd29d9..634642b87 100644 --- a/lib/src/conflicts.rs +++ b/lib/src/conflicts.rs @@ -300,9 +300,7 @@ fn materialize_conflict_hunks( format!("base #{}", base_index + 1) }; - let right1 = if let Some(right1) = hunk.get_add(add_index) { - right1 - } else { + let Some(right1) = hunk.get_add(add_index) else { // If we have no more positive terms, emit the remaining negative // terms as snapshots. output.write_all(CONFLICT_MINUS_LINE)?;