Skip to content

Commit

Permalink
Fix Elixir 1.15 warnings (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
axelson authored Sep 24, 2023
1 parent 6246beb commit b13edb5
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions lib/scenic/assets/static.ex
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ defmodule Scenic.Assets.Static do
|> Path.join(Static.dst_dir())
rescue
e ->
Logger.warn(
Logger.warning(
"'use Scenic.Assets.Static' requires a valid :otp_app option. Received otp_app #{opts[:otp_app]}"
)

Expand Down Expand Up @@ -583,7 +583,7 @@ defmodule Scenic.Assets.Static do
assign(lib, :aliases, new_alias, hash)

_ ->
Logger.warn("Attempted to alias #{inspect(new_alias)} to unknown asset: #{inspect(to)}")
Logger.warning("Attempted to alias #{inspect(new_alias)} to unknown asset: #{inspect(to)}")
lib
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/scenic/component/input/checkbox.ex
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ defmodule Scenic.Component.Input.Checkbox do
end

def handle_put(v, %{assigns: %{id: id}} = scene) do
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Checkbox id: #{inspect(id)}, value: #{inspect(v)}"
)

Expand Down
4 changes: 2 additions & 2 deletions lib/scenic/component/input/dropdown.ex
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ defmodule Scenic.Component.Input.Dropdown do
scene =
case Enum.find(items, fn {_, id} -> id == s_id end) do
nil ->
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Dropdown id: #{inspect(id)}, value: #{inspect(s_id)}"
)

Expand Down Expand Up @@ -709,7 +709,7 @@ defmodule Scenic.Component.Input.Dropdown do
end

def handle_put(v, %{assigns: %{id: id}} = scene) do
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Dropdown id: #{inspect(id)}, value: #{inspect(v)}"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/scenic/component/input/radio_button.ex
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ defmodule Scenic.Component.Input.RadioButton do
end

def handle_put(v, %{assigns: %{id: id}} = scene) do
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Radio Button id: #{inspect(id)}, value: #{inspect(v)}"
)

Expand Down
4 changes: 2 additions & 2 deletions lib/scenic/component/input/radio_group.ex
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ defmodule Scenic.Component.Input.RadioGroup do
scene =
case Enum.find(items, fn {_, id} -> id == value end) do
nil ->
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Radio Group id: #{inspect(id)}, value: #{inspect(value)}"
)

Expand All @@ -284,7 +284,7 @@ defmodule Scenic.Component.Input.RadioGroup do
end

def handle_put(v, %{assigns: %{id: id}} = scene) do
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Dropdown id: #{inspect(id)}, value: #{inspect(v)}"
)

Expand Down
4 changes: 2 additions & 2 deletions lib/scenic/component/input/slider.ex
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ defmodule Scenic.Component.Input.Slider do
scene =
case Enum.member?(extents, value) do
false ->
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Slider id: #{inspect(id)}, value: #{inspect(value)}"
)

Expand Down Expand Up @@ -444,7 +444,7 @@ defmodule Scenic.Component.Input.Slider do
end

def handle_put(v, %{assigns: %{id: id}} = scene) do
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Slider id: #{inspect(id)}, value: #{inspect(v)}"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/scenic/component/input/text_field.ex
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ defmodule Scenic.Component.Input.TextField do
end

def handle_put(v, %{assigns: %{id: id}} = scene) do
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on TextField id: #{inspect(id)}, value: #{inspect(v)}"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/scenic/component/input/toggle.ex
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ defmodule Scenic.Component.Input.Toggle do
end

def handle_put(v, %{assigns: %{id: id}} = scene) do
Logger.warn(
Logger.warning(
"Attempted to put an invalid value on Toggle id: #{inspect(id)}, value: #{inspect(v)}"
)

Expand Down
4 changes: 2 additions & 2 deletions lib/scenic/driver.ex
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ defmodule Scenic.Driver do
%Driver{input_limited: true, input_buffer: buffer} = driver,
{class, _} = input
) do
# Logger.warn( "input_limited #{inspect({input})}" )
# Logger.warning( "input_limited #{inspect({input})}" )
case class do
:cursor_pos -> %{driver | input_buffer: Map.put(buffer, class, input)}
:cursor_scroll -> %{driver | input_buffer: Map.put(buffer, class, input)}
Expand All @@ -421,7 +421,7 @@ defmodule Scenic.Driver do
%Driver{limit_ms: limit_ms} = driver,
{class, _} = input
) do
# Logger.warn( "input #{inspect({input})}" )
# Logger.warning( "input #{inspect({input})}" )
case class do
:cursor_pos ->
Process.send_after(self(), @input_limiter, limit_ms)
Expand Down
2 changes: 1 addition & 1 deletion lib/scenic/scene.ex
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ defmodule Scenic.Scene do

_ ->
# invalid data. log a warning
Logger.warn(
Logger.warning(
"Attempted to update component with invalid data. id: #{inspect(id)}, data: #{inspect(new_value)}"
)

Expand Down

0 comments on commit b13edb5

Please sign in to comment.