Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove superfluous module argument #560

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading