Skip to content

Commit

Permalink
Remove dead code found by the type system
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Nov 12, 2024
1 parent 71095dc commit 3308f27
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/postgrex/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1209,9 +1209,6 @@ defmodule Postgrex.Protocol do

{:disconnect, err, s} ->
{:disconnect, err, s}

{:error, %Postgrex.Error{} = err, s, buffer} ->
error_ready(s, status, err, buffer)
end
end

Expand Down Expand Up @@ -1319,10 +1316,6 @@ defmodule Postgrex.Protocol do

{:disconnect, err, s} ->
{:disconnect, err, s}

{:error, %Postgrex.Error{} = err, s, buffer} ->
status = new_status([], mode: :transaction)
error_ready(s, status, err, buffer)
end
end

Expand Down Expand Up @@ -2997,14 +2990,6 @@ defmodule Postgrex.Protocol do

{:disconnect, err, s} ->
{:disconnect, err, s}

{:error, %Postgrex.Error{} = err, s, buffer} ->
# We convert {:error, err, state} to {:error, state}
# so that DBConnection will disconnect during handle_begin/handle_rollback
# and will attempt to rollback during handle_commit
with {:error, _err, s} <- error_ready(s, status, err, buffer) do
{:error, s}
end
end
end

Expand Down

0 comments on commit 3308f27

Please sign in to comment.