Skip to content

Commit

Permalink
fix: update code for credo linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner committed Apr 13, 2024
1 parent e40cd1b commit 7a59a7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/jumar/types/type_id.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ defmodule Jumar.Types.TypeId do
unless opts
|> Keyword.get(:prefix)
|> :binary.bin_to_list()
|> Enum.all?(&is_ascii_lowercase?/1) do
|> Enum.all?(&ascii_lowercase?/1) do
raise ArgumentError,
message: "#{__MODULE__} prefix must only container lowercase ascii characters."
end
Expand All @@ -86,8 +86,8 @@ defmodule Jumar.Types.TypeId do
Enum.into(opts, %{})
end

defp is_ascii_lowercase?(char) when char in 97..122, do: true
defp is_ascii_lowercase?(_), do: false
defp ascii_lowercase?(char) when char in 97..122, do: true
defp ascii_lowercase?(_), do: false

@doc """
Casts a given input to a type id.
Expand Down

0 comments on commit 7a59a7b

Please sign in to comment.