We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c5c083 commit 8f72ea8Copy full SHA for 8f72ea8
lib/ex_unit/lib/ex_unit/diff.ex
@@ -377,12 +377,8 @@ defmodule ExUnit.Diff do
377
{parsed_left, improper_left, operators_left, length_left} =
378
split_left_list(left, 0, env.context)
379
380
- {parsed_right, improper_right} =
381
- if improper_left != [] do
382
- split_right_list(right, length_left, [])
383
- else
384
- split_right_list(right, -1, [])
385
- end
+ element_limit = if improper_left == [], do: -1, else: length_left
+ {parsed_right, improper_right} = split_right_list(right, element_limit, [])
386
387
{parsed_diff, parsed_post_env} = myers_difference_list(parsed_left, parsed_right, env)
388
0 commit comments