Skip to content

Commit 2146bb4

Browse files
committed
Remove unecessary :beam_lib.info/1 call, closes #12317
1 parent 5a583c7 commit 2146bb4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/elixir/lib/module/parallel_checker.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ defmodule Module.ParallelChecker do
327327

328328
defp cache_from_chunk(ets, module) do
329329
with {^module, binary, _filename} <- :code.get_object_code(module),
330-
{:ok, ^module} <- binary |> :beam_lib.info() |> Keyword.fetch(:module),
331-
{:ok, {_, [{'ExCk', chunk}]}} <- :beam_lib.chunks(binary, ['ExCk']),
330+
{:ok, {^module, [{~c"ExCk", chunk}]}} <- :beam_lib.chunks(binary, [~c"ExCk"]),
332331
{:elixir_checker_v1, contents} <- :erlang.binary_to_term(chunk) do
333332
cache_chunk(ets, module, contents.exports)
334333
true

0 commit comments

Comments
 (0)