Skip to content

Commit 3a607a7

Browse files
committed
Simplify by using assert_eq!
1 parent cb66d19 commit 3a607a7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

gix-diff/tests/diff/blob/slider.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,7 @@ mod baseline {
214214
hunk_lines.push(b'\n');
215215
}
216216
b'\\' => {
217-
if line == "\\ No newline at end of file".as_bytes() {
218-
// Do nothing.
219-
} else {
220-
unreachable!(
221-
"BUG: expecting unified diff format, found line: `{}`",
222-
line.to_str_lossy()
223-
)
224-
}
217+
assert_eq!(line, "\\ No newline at end of file".as_bytes());
225218
}
226219
_ => unreachable!(
227220
"BUG: expecting unified diff format, found line: `{}`",

0 commit comments

Comments
 (0)