Skip to content

Commit

Permalink
Remove case dead end
Browse files Browse the repository at this point in the history
According to dialyzer, (results -- seen_results) will always be a List
so the second case option will never be reached. With only one option,
the case statement itself is no longer needed.
  • Loading branch information
fastjames committed Jun 28, 2022
1 parent 91bda65 commit 0d4d341
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/forcex/bulk/batch_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ defmodule Forcex.Bulk.BatchWorker do
seen_results = Keyword.get(state, :results, [])

results = Forcex.Bulk.fetch_batch_result_status(batch, client)
case (results -- seen_results) do
list when is_list(list) ->
for result <- list do
notify_handlers({:batch_partial_result_ready, batch, result}, handlers)
end
_ -> true
for result <- (results -- seen_results) do
notify_handlers({:batch_partial_result_ready, batch, result}, handlers)
end

Keyword.put(state, :results, results)
Expand Down

0 comments on commit 0d4d341

Please sign in to comment.