Skip to content

Commit

Permalink
Use :erlang.nif_error/1 in README (rusterlium#126)
Browse files Browse the repository at this point in the history
By using :erlang.nif_error/1, false warnings from Dialyzer are suppressed. This should help
users new to Rustler to avoid useless warnings.
  • Loading branch information
evnu authored and scrogson committed Jan 22, 2018
1 parent b1c85d1 commit 2d564e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rustler_mix/priv/templates/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule <%= module %> do
use Rustler, otp_app: [otp app], crate: "<%= library_name %>"

# When your NIF is loaded, it will override this function.
def add(_a, _b), do: throw :nif_not_loaded
def add(_a, _b), do: :erlang.nif_error(:nif_not_loaded)
end
```

Expand Down

0 comments on commit 2d564e3

Please sign in to comment.