CrowdHailer / Ace

HTTP web server and client, supports http1 and http2

Home Page:https://hex.pm/packages/ace

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seems this can be simplified further

CharlesOkwuagwu opened this issue · comments

Ace/lib/ace/http/worker.ex

Lines 88 to 100 in 58d19db

defp normalise_reaction(response = %Raxx.Response{}, state) do
case response.body do
false ->
{[response], state}
true ->
{[response], state}
_body ->
# {[%{response | body: true}, Raxx.data(response.body), Raxx.tail], state}
{[response], state}
end
end

Regardless of the value of response.body, you return {[response], state}

Yes would agree. It obviously works without those commented parts