Skip to content

Commit

Permalink
fix: mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
hpopp committed Aug 29, 2024
1 parent 0edaf5f commit 81bbf90
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.15.5-otp-26
erlang 26.0.2
elixir 1.17.2-otp-27
erlang 27.0.1
2 changes: 1 addition & 1 deletion lib/pigeon/apns/token.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Pigeon.APNS.Token do

@type t :: {non_neg_integer(), binary() | nil}

@spec start_link((() -> any())) :: Agent.on_start()
@spec start_link((-> any())) :: Agent.on_start()
def start_link(_) do
Agent.start_link(fn -> %{} end, name: __MODULE__)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/pigeon/fcm/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Pigeon.FCM.Config do
defstruct port: 443,
project_id: nil,
service_account_json: nil,
uri: 'fcm.googleapis.com'
uri: ~c"fcm.googleapis.com"

@type t :: %__MODULE__{
port: pos_integer,
Expand Down Expand Up @@ -44,7 +44,7 @@ defmodule Pigeon.FCM.Config do
port: Keyword.get(opts, :port, 443),
project_id: project_id,
service_account_json: service_account_json,
uri: Keyword.get(opts, :uri, 'fcm.googleapis.com')
uri: Keyword.get(opts, :uri, ~c"fcm.googleapis.com")
}
end

Expand Down
8 changes: 5 additions & 3 deletions lib/pigeon/legacy_fcm/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Pigeon.LegacyFCM.Config do
@moduledoc false

defstruct key: nil,
uri: 'fcm.googleapis.com',
uri: ~c"fcm.googleapis.com",
port: 443

@type t :: %__MODULE__{
Expand Down Expand Up @@ -30,7 +30,7 @@ defmodule Pigeon.LegacyFCM.Config do
def new(opts) when is_list(opts) do
%__MODULE__{
key: Keyword.get(opts, :key),
uri: Keyword.get(opts, :uri, 'fcm.googleapis.com'),
uri: Keyword.get(opts, :uri, ~c"fcm.googleapis.com"),
port: Keyword.get(opts, :port, 443)
}
end
Expand Down Expand Up @@ -167,7 +167,9 @@ defimpl Pigeon.Configurable, for: Pigeon.LegacyFCM.Config do
def parse_error(data) do
case Pigeon.json_library().decode(data) do
{:ok, response} ->
(response["reason"] || "unknown") |> Macro.underscore() |> String.to_existing_atom()
(response["reason"] || "unknown")
|> Macro.underscore()
|> String.to_existing_atom()

error ->
"JSON parse failed: #{inspect(error)}, body: #{inspect(data)}"
Expand Down

0 comments on commit 81bbf90

Please sign in to comment.