Skip to content

Commit

Permalink
fix(Credo): Removed uses of filter |> count (#2019)
Browse files Browse the repository at this point in the history
  • Loading branch information
kotva006 authored May 1, 2024
1 parent 3bd84f1 commit 0f7e231
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/schedules/repo_condensed_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ defmodule Schedules.RepoCondensedTest do
direction_id: 0
)

before_now = unfiltered |> Enum.filter(before_now_fn) |> Enum.count()
before_now = Enum.count(unfiltered, before_now_fn)
assert before_now > 0

filtered =
Expand All @@ -64,7 +64,7 @@ defmodule Schedules.RepoCondensedTest do
min_time: now
)

before_now = filtered |> Enum.filter(before_now_fn) |> Enum.count()
before_now = Enum.count(filtered, before_now_fn)
assert before_now == 0
end

Expand Down
4 changes: 2 additions & 2 deletions test/schedules/repo_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ defmodule Schedules.RepoTest do
direction_id: 0
)

before_now = unfiltered |> Enum.filter(before_now_fn) |> Enum.count()
before_now = Enum.count(unfiltered, before_now_fn)
assert before_now > 0

filtered =
Expand All @@ -91,7 +91,7 @@ defmodule Schedules.RepoTest do
min_time: now
)

before_now = filtered |> Enum.filter(before_now_fn) |> Enum.count()
before_now = Enum.count(filtered, before_now_fn)
assert before_now == 0
end

Expand Down

0 comments on commit 0f7e231

Please sign in to comment.