Skip to content

Commit b71c8fe

Browse files
committed
Fix some issues reported by credo
1 parent a6295b8 commit b71c8fe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/bypass/instance.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ defmodule Bypass.Instance do
266266
problem_route =
267267
expectations
268268
|> Enum.reject(fn {_route, expectations} -> expectations[:expected] == :none_or_more end)
269-
|> Enum.find(fn {_route, expectations} -> length(expectations.results) == 0 end)
269+
|> Enum.find(fn {_route, expectations} -> Enum.empty?(expectations.results) end)
270270

271271
case problem_route do
272272
{route, _} ->
@@ -436,7 +436,7 @@ defmodule Bypass.Instance do
436436
defp so_reuseport() do
437437
case :os.type() do
438438
{:unix, :linux} -> [{:raw, 1, 15, <<1::32-native>>}]
439-
{:unix, :darwin} -> [{:raw, 65535, 512, <<1::32-native>>}]
439+
{:unix, :darwin} -> [{:raw, 65_535, 512, <<1::32-native>>}]
440440
_ -> []
441441
end
442442
end

test/bypass_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ defmodule BypassTest do
432432
"""
433433
def request(port, path \\ "/example_path", method \\ "POST") do
434434
with {:ok, conn} <- Mint.HTTP.connect(:http, "127.0.0.1", port),
435-
{:ok, conn, ref} = Mint.HTTP.request(conn, method, path, [], "") do
435+
{:ok, conn, ref} <- Mint.HTTP.request(conn, method, path, [], "") do
436436
receive_responses(conn, ref, 100, [])
437437
end
438438
end

0 commit comments

Comments
 (0)