Skip to content

Commit 219bcc9

Browse files
committed
Rely on the existing module passed in
1 parent 5f50a1f commit 219bcc9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/elixir/lib/module/parallel_checker.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ defmodule Module.ParallelChecker do
5252
# we discard their module map on purpose and start from file.
5353
info =
5454
if beam_location != [] and Keyword.has_key?(module_map.attributes, :__protocol__) do
55-
{module, List.to_string(beam_location)}
55+
List.to_string(beam_location)
5656
else
5757
cache_from_module_map(table, module_map)
5858
end
@@ -72,12 +72,12 @@ defmodule Module.ParallelChecker do
7272
Process.link(pid)
7373

7474
module_tuple =
75-
case info do
76-
{module, location} ->
75+
cond do
76+
is_binary(info) ->
7777
location =
7878
case :code.which(module) do
7979
[_ | _] = path -> path
80-
_ -> location
80+
_ -> info
8181
end
8282

8383
with {:ok, binary} <- File.read(location),
@@ -89,7 +89,7 @@ defmodule Module.ParallelChecker do
8989
_ -> nil
9090
end
9191

92-
_ ->
92+
is_tuple(info) ->
9393
info
9494
end
9595

0 commit comments

Comments
 (0)