Skip to content

Commit

Permalink
Updated usage of "not expr1 in expr2" to support Elixir 1.5+
Browse files Browse the repository at this point in the history
Elixir 1.5+ shall be deprecating this operation.
I just added parentheses to fix this and also support earlier Elixir versions.

See the reported warning below:
"not expr1 in expr2" is deprecated. Instead use "expr1 not in expr2" if you require Elixir v1.5+, or "not(expr1 in expr2)" if you have to support earlier Elixir versions.
  • Loading branch information
hadrianpaulo authored Sep 25, 2018
1 parent 278e6a9 commit 6851aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/scrivener/html.ex
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ defmodule Scrivener.HTML do
"#{acc}#{if(acc != "", do: "_")}#{Phoenix.Naming.resource_name(model.__struct__)}"
end

defp _pagination_links(_paginator, [view_style: style, path: _path, args: _args, page_param: _page_param, params: _params]) when not style in @view_styles do
defp _pagination_links(_paginator, [view_style: style, path: _path, args: _args, page_param: _page_param, params: _params]) when not (style in @view_styles) do
raise "Scrivener.HTML: View style #{inspect style} is not a valid view style. Please use one of #{inspect @view_styles}"
end

Expand Down

0 comments on commit 6851aa3

Please sign in to comment.