Skip to content

Commit

Permalink
Remove superfluous module argument (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
evnu authored Aug 17, 2023
1 parent a928774 commit 6e8349f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rustler_mix/lib/rustler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ defmodule Rustler do
quote bind_quoted: [opts: opts] do
otp_app = Keyword.fetch!(opts, :otp_app)
env = Application.compile_env(otp_app, __MODULE__, [])
config = Rustler.Compiler.compile_crate(otp_app, __MODULE__, env, opts)
config = Rustler.Compiler.compile_crate(otp_app, env, opts)

for resource <- config.external_resources do
@external_resource resource
Expand Down
4 changes: 2 additions & 2 deletions rustler_mix/lib/rustler/compiler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule Rustler.Compiler do
alias Rustler.Compiler.{Config, Messages, Rustup}

@doc false
def compile_crate(otp_app, module, config, opts) do
config = Config.from(otp_app, module, config, opts)
def compile_crate(otp_app, config, opts) do
config = Config.from(otp_app, config, opts)

unless config.skip_compilation? do
crate_full_path = Path.expand(config.path, File.cwd!())
Expand Down
2 changes: 1 addition & 1 deletion rustler_mix/lib/rustler/compiler/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defmodule Rustler.Compiler.Config do

alias Rustler.Compiler.Config

def from(otp_app, module, config, opts) do
def from(otp_app, config, opts) do
crate = config[:crate] || opts[:crate] || otp_app

# TODO: Remove in 1.0
Expand Down

0 comments on commit 6e8349f

Please sign in to comment.