Skip to content

Commit d04a22c

Browse files
Valiancorka149
authored andcommitted
fixed credo checks
1 parent 4e4c169 commit d04a22c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/jsonpatch.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ defmodule Jsonpatch do
225225
# The complete desination was check. Every key that is not in the list of
226226
# checked keys, must be removed.
227227
Enum.reduce(source, patches, fn {k, _}, patches ->
228-
if k not in checked_keys do
229-
[%{op: "remove", path: "#{ancestor_path}/#{escape(k)}"} | patches]
230-
else
228+
if k in checked_keys do
231229
patches
230+
else
231+
[%{op: "remove", path: "#{ancestor_path}/#{escape(k)}"} | patches]
232232
end
233233
end)
234234
end

test/benchmark.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ defmodule JsonpatchBenchmark do
196196
"host" => "db.example.com",
197197
"port" => 5432,
198198
"name" => "myapp_production",
199-
"pool" => %{"size" => 20, "timeout" => 10000, "idle_timeout" => 30000}
199+
"pool" => %{"size" => 20, "timeout" => 10_000, "idle_timeout" => 30_000}
200200
},
201201
"cache" => %{
202202
"host" => "redis.example.com",

0 commit comments

Comments
 (0)