Fix warnings

This commit is contained in:
Marcel Otto 2018-08-31 01:14:58 +02:00
parent c76e9a1f39
commit 9e9330a08b
4 changed files with 5 additions and 5 deletions

View file

@ -305,7 +305,7 @@ defmodule JSON.LD.Context do
# 16.1)
defp do_create_container_definition(_, %{"@container" => container})
when not container in ~w[@list @set @index @language],
when container not in ~w[@list @set @index @language],
do: raise JSON.LD.InvalidContainerMappingError,
message: "#{inspect container} is not a valid container mapping; @container must be either @list, @set, @index, or @language"
# 16.2)

View file

@ -319,11 +319,11 @@ defmodule JSON.LD.Encoder do
end
defp encode_json(value, opts \\ []) do
defp encode_json(value, opts) do
Jason.encode(value, opts)
end
defp encode_json!(value, opts \\ []) do
defp encode_json!(value, opts) do
Jason.encode!(value, opts)
end

View file

@ -304,7 +304,7 @@ defmodule JSON.LD.Expansion do
# 8)
%{"@value" => value} ->
with keys = Map.keys(result) do # 8.1)
if Enum.any?(keys, &(not &1 in ~w[@value @language @type @index])) ||
if Enum.any?(keys, &(&1 not in ~w[@value @language @type @index])) ||
("@language" in keys and "@type" in keys) do
raise JSON.LD.InvalidValueObjectError,
message: "value object with disallowed members"

View file

@ -30,7 +30,7 @@ defmodule JSON.LD.Mixfile do
# ExCoveralls
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
"coveralls": :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test