Skip to content

Commit

Permalink
fix: tag config_type response to avoid compilation warning (#281)
Browse files Browse the repository at this point in the history
This will only happen on Elixir 1.18. The solution was suggested here: elixir-lang/elixir#14043
  • Loading branch information
wkirschbaum authored Dec 10, 2024
1 parent 0f0248b commit 0a54039
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/pigeon/apns/config_parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ defmodule Pigeon.APNS.ConfigParser do
reason: "configuration is invalid",
config: opts

type ->
{:ok, type} ->
type.new(opts)
end
end

@spec config_type(any) :: module | :error
@spec config_type(any) :: {:ok, module} | :error
defp config_type(%{cert: _cert, key_identifier: _key_id}), do: :error
defp config_type(%{cert: _cert}), do: Config
defp config_type(%{key_identifier: _jwt_key}), do: JWTConfig
defp config_type(%{cert: _cert}), do: {:ok, Config}
defp config_type(%{key_identifier: _jwt_key}), do: {:ok, JWTConfig}
defp config_type(_else), do: :error

@doc false
Expand Down

0 comments on commit 0a54039

Please sign in to comment.