Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Elixir 1.15 warnings #329

Merged
merged 1 commit into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion lib/scenic/script.ex
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ defmodule Scenic.Script do
Building and using a custom script happens in three parts. First, the script itself
is created using the `Scenic.Script` api.

Then the script is published to the ViewPort using `Scenic.Scene/push_script/4` with a
Then the script is published to the ViewPort using `Scenic.Scene.push_script/4` with a
unique name.

Later, the graph for the checkbox references this script, which is what triggers it to be drawn.
Expand Down
Loading