Skip to content

Commit

Permalink
Simplify checks
Browse files Browse the repository at this point in the history
  • Loading branch information
oSoMoN committed Mar 1, 2024
1 parent f315616 commit e643584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/context_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ pub fn diff(
let diff_results = make_diff(expected, actual, context_size, stop_early);
if diff_results.is_empty() {
return Vec::new();
} else if stop_early {
}
if stop_early {
return output;
}
for result in diff_results {
Expand Down
3 changes: 2 additions & 1 deletion src/unified_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ pub fn diff(
let diff_results = make_diff(expected, actual, context_size, stop_early);
if diff_results.is_empty() {
return Vec::new();
} else if stop_early {
}
if stop_early {
return output;
}
for result in diff_results {
Expand Down

0 comments on commit e643584

Please sign in to comment.