Skip to content

Commit 08d27db

Browse files
committed
run formatter
1 parent 09b58c6 commit 08d27db

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

lib/scenic/cache/term.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule Scenic.Cache.Term do
2020
# to use as a key even it is is already loaded into the cache.
2121
def load(path, :insecure, opts) do
2222
with {:ok, data} <- Cache.File.read(path, :insecure, opts),
23-
{:ok, hash} <- Hash.binary(data, opts[:hash] || :sha) do
23+
{:ok, hash} <- Hash.binary(data, opts[:hash] || :sha) do
2424
case Cache.claim(hash, opts[:scope]) do
2525
true ->
2626
{:ok, hash}

lib/scenic/component/input/radio_button.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ defmodule Scenic.Component.Input.RadioButton do
2222
def verify({text, _} = data) when is_bitstring(text) do
2323
{:ok, data}
2424
end
25+
2526
def verify({text, _, checked?} = data) when is_bitstring(text) and is_boolean(checked?) do
2627
{:ok, data}
2728
end
29+
2830
def verify(_), do: :invalid_data
2931

3032
# --------------------------------------------------------

lib/scenic/math/matrix.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ defmodule Scenic.Math.Matrix do
459459
build_scale(s)
460460
)
461461
end
462+
462463
# def scale(matrix, x, y), do: build_scale(x, y) |> (&Matrix.mul(matrix, &1)).()
463464
# def scale(matrix, x, y, z), do: build_scale(x, y, z) |> (&Matrix.mul(matrix, &1)).()
464465

@@ -506,7 +507,7 @@ defmodule Scenic.Math.Matrix do
506507
Returns:
507508
A number
508509
"""
509-
@spec put(matrix :: Math.matrix, x :: number, y :: number, v :: number) :: Math.matrix()
510+
@spec put(matrix :: Math.matrix(), x :: number, y :: number, v :: number) :: Math.matrix()
510511
def put(matrix, x, y, v)
511512
def put(matrix, x, y, v) when is_integer(v), do: put(matrix, x, y, v * 1.0)
512513

@@ -538,7 +539,7 @@ defmodule Scenic.Math.Matrix do
538539
Returns:
539540
A vector_2
540541
"""
541-
@spec get_xy(matrix :: Math.matrix) :: Math.vector_2()
542+
@spec get_xy(matrix :: Math.matrix()) :: Math.vector_2()
542543
def get_xy(matrix)
543544

544545
def get_xy(<<
@@ -669,7 +670,7 @@ defmodule Scenic.Math.Matrix do
669670
Returns:
670671
The resulting matrix
671672
"""
672-
@spec mul(matrix :: Math.matrix(), multiplier :: (number | Math.matrix())) :: Math.matrix()
673+
@spec mul(matrix :: Math.matrix(), multiplier :: number | Math.matrix()) :: Math.matrix()
673674

674675
def mul(matrix, multiplier)
675676
def mul(a, s) when is_integer(s), do: mul(a, s * 1.0)

test/scenic/cache/hash_test.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ defmodule Scenic.Cache.HashTest do
4545

4646
test "binary! raises on an invalid hash type" do
4747
data = "some data. af98hwu4lhrliw4uhtliuhet;giojres;ihg;usdhg"
48+
4849
assert_raise Scenic.Cache.Hash.Error, fn ->
4950
Hash.binary!(data, :invalid)
5051
end

0 commit comments

Comments
 (0)