Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Leopardi <[email protected]>
  • Loading branch information
wojtekmach and whatyouhide authored Aug 15, 2024
1 parent f307e26 commit 55ab096
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/mint/http.ex
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,7 @@ defmodule Mint.HTTP do
}
iex> Mint.HTTP.open?(conn)
true
"""
@spec request_and_response(
t(),
Expand All @@ -934,8 +935,8 @@ defmodule Mint.HTTP do
{:ok, t(), response}
| {:error, t(), Types.error()}
when response: %{
status: non_neg_integer(),
headers: [{binary(), binary()}],
status: Types.status(),
headers: Types.headers(),
body: binary()
}
def request_and_response(conn, method, path, headers, body, options \\ []) do
Expand Down Expand Up @@ -1009,7 +1010,7 @@ defmodule Mint.HTTP do
end

# TODO: Remove when we require Elixir v1.13
if Version.match?(System.version(), ">= 1.13.0") do
if function_exported?(Keyword, :validate!, 2) do
defp keyword_validate!(keyword, values), do: Keyword.validate!(keyword, values)
else
defp keyword_validate!(keyword, _values), do: keyword
Expand Down

0 comments on commit 55ab096

Please sign in to comment.