Skip to content

Commit

Permalink
refactor: deprecate use of unless
Browse files Browse the repository at this point in the history
The language is [moving away from
unless](elixir-lang/elixir#13851)
  • Loading branch information
johnmcguin committed Oct 9, 2024
1 parent d575da7 commit abd90d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/guardian/permissions.ex
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ defmodule Guardian.Permissions do

raw_perms = @config_permissions.()

unless raw_perms do
if !raw_perms do
raise "Permissions are not defined for #{to_string(__MODULE__)}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/guardian/plug/pipeline.ex
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ if Code.ensure_loaded?(Plug) do
|> Keyword.merge(unquote(opts))
|> config()

unless Keyword.get(new_opts, :otp_app), do: raise_error(:otp_app)
if !Keyword.get(new_opts, :otp_app), do: raise_error(:otp_app)

new_opts
end
Expand Down

0 comments on commit abd90d3

Please sign in to comment.