diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e2d25de..ef1101cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,8 @@ jobs: fail-fast: false matrix: include: - - erlang: "26.0.2" - elixir: "1.15" + - erlang: "26.2" + elixir: "1.16" lint: true coverage: true dialyzer: true @@ -25,7 +25,7 @@ jobs: elixir: "1.11" dialyzer: true - erlang: "21.3" - elixir: "1.10" + elixir: "1.11.4-otp-21" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MIX_ENV: test diff --git a/lib/mint/http.ex b/lib/mint/http.ex index f3023af6..1ee10cac 100644 --- a/lib/mint/http.ex +++ b/lib/mint/http.ex @@ -128,13 +128,6 @@ defmodule Mint.HTTP do @opaque t() :: Mint.HTTP1.t() | Mint.HTTP2.t() - # TODO: Remove once we depend on Elixir 1.11+, which defines is_struct/2 - if not macro_exported?(Kernel, :is_struct, 2) do - defguardp is_struct(struct, module) - when is_map(struct) and is_atom(module) and is_map_key(struct, :__struct__) and - :erlang.map_get(:__struct__, struct) == module - end - defguardp is_data_message(message) when elem(message, 0) in [:ssl, :tcp] and tuple_size(message) == 3 diff --git a/lib/mint/http2.ex b/lib/mint/http2.ex index c12a88aa..df54869f 100644 --- a/lib/mint/http2.ex +++ b/lib/mint/http2.ex @@ -232,22 +232,13 @@ defmodule Mint.HTTP2 do conn = unquote(conn) if conn.log do - Logger.log(normalize_logger_level(unquote(level)), unquote(message)) + Logger.log(unquote(level), unquote(message)) else :ok end end end - # TODO: remove this once we depend on Elixir 1.11+. - if macro_exported?(Logger, :warning, 2) do - defp normalize_logger_level(:warning), do: :warning - else - defp normalize_logger_level(:warning), do: :warn - end - - defp normalize_logger_level(level), do: level - ## Types @typedoc """ diff --git a/mix.exs b/mix.exs index 721e8e9f..7600dc8d 100644 --- a/mix.exs +++ b/mix.exs @@ -8,7 +8,7 @@ defmodule Mint.MixProject do [ app: :mint, version: @version, - elixir: "~> 1.10", + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, elixirc_paths: elixirc_paths(Mix.env()), deps: deps(),