From e8ae1671910e5874e8e2f594818d6fd9efcab6b6 Mon Sep 17 00:00:00 2001 From: Adrian Kumpf Date: Fri, 22 Jun 2018 07:42:10 +0200 Subject: [PATCH] Update dependencies --- mix.exs | 4 ++-- mix.lock | 2 +- native/arb/Cargo.lock | 40 +++++++++++++++++----------------------- native/arb/Cargo.toml | 4 ++-- native/arb/src/lib.rs | 13 +++++++------ 5 files changed, 29 insertions(+), 34 deletions(-) diff --git a/mix.exs b/mix.exs index 5461a1e..9a65e81 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Arb.MixProject do def project do [ app: :arb, - version: "0.2.1", + version: "0.2.2", elixir: "~> 1.6", start_permanent: Mix.env() == :prod, compilers: [:rustler] ++ Mix.compilers(), @@ -28,7 +28,7 @@ defmodule Arb.MixProject do defp deps do [ - {:rustler, "~> 0.16.0"}, + {:rustler, "~> 0.17.0"}, {:ex_doc, "~> 0.16", only: :dev, runtime: false} ] end diff --git a/mix.lock b/mix.lock index 496f015..12dfd8b 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,5 @@ %{ "earmark": {:hex, :earmark, "1.2.5", "4d21980d5d2862a2e13ec3c49ad9ad783ffc7ca5769cf6ff891a4553fbaae761", [:mix], [], "hexpm"}, "ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}, - "rustler": {:hex, :rustler, "0.16.0", "9b04237d2e7b30fcae40a28edb56f59aad8f4e3c8790f4996b5f200f649964be", [:mix], [], "hexpm"}, + "rustler": {:hex, :rustler, "0.17.1", "2b4f120daf411b4eebd8cad6cb68f7d519dc409ca9e70daa8856d1d37b13e203", [:mix], [], "hexpm"}, } diff --git a/native/arb/Cargo.lock b/native/arb/Cargo.lock index 95758f9..fd5438d 100644 --- a/native/arb/Cargo.lock +++ b/native/arb/Cargo.lock @@ -3,9 +3,9 @@ name = "arb" version = "0.1.0" dependencies = [ "arb 0.2.1 (git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.1)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustler 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustler_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustler 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustler_codegen 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -31,7 +31,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "erlang_nif-sys" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -47,17 +47,12 @@ dependencies = [ [[package]] name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.40" +version = "0.2.42" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -66,7 +61,7 @@ version = "0.3.0" source = "git+https://github.com/adriankumpf/libusb-rs?branch=dev#19d26c44eebd4a8d4a9332bca2c00ca83c75fb6c" dependencies = [ "bit-set 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "libusb-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -75,7 +70,7 @@ name = "libusb-sys" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -91,16 +86,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rustler" -version = "0.16.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "erlang_nif-sys 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "erlang_nif-sys 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustler_codegen" -version = "0.16.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -153,17 +148,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum arb 0.2.1 (git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.1)" = "" "checksum bit-set 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e6e1e6fb1c9e3d6fcdec57216a74eaa03e41f52a22f13a16438251d8e88b89da" "checksum bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440d5cb623bb7390ae27fec0bb6c61111969860f8e3ae198bfa0663645e67cf" -"checksum erlang_nif-sys 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2804cb6ae339787d993faafdd5e4af5a882128e44343a710d1061c487086eaa3" +"checksum erlang_nif-sys 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9bc72dbc2c220693a2a009ec97705c144ea5cc5db703df43feb903663c999536" "checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" -"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" +"checksum lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e6412c5e2ad9584b0b8e979393122026cdd6d2a80b933f890dcd694ddbe73739" +"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1" "checksum libusb 0.3.0 (git+https://github.com/adriankumpf/libusb-rs?branch=dev)" = "" "checksum libusb-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4c53b6582563d64ad3e692f54ef95239c3ea8069e82c9eb70ca948869a7ad767" "checksum pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "110d5ee3593dbb73f56294327fe5668bcc997897097cbc76b51e7aed3f52452f" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum rustler 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "346b8e397f17bc25a7a2b2a394fe016547817fe17a7c6849d878f1c6f1e369a2" -"checksum rustler_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b94e2cb016a43a5e269a5cf76523d00278347f985cf7fbf6062ef026236144d" +"checksum rustler 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "172dfffeab1a9364145d6019317f69e29b5dcf7ec135b737265a4e9a405cbae6" +"checksum rustler_codegen 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "63242fb3e7483b365e3800cf0b60f4fe95dd7023e68e683f44c00bafffa35f04" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" diff --git a/native/arb/Cargo.toml b/native/arb/Cargo.toml index 3a0b2b5..4b0bee3 100644 --- a/native/arb/Cargo.toml +++ b/native/arb/Cargo.toml @@ -9,7 +9,7 @@ path = "src/lib.rs" crate-type = ["dylib"] [dependencies] -rustler = "0.16.0" -rustler_codegen = "0.16.0" +rustler = "0.17.0" +rustler_codegen = "0.17.0" lazy_static = "1.0.0" arb = { git = "https://github.com/adriankumpf/abacom-relay-board", tag = 'v0.2.1' } diff --git a/native/arb/src/lib.rs b/native/arb/src/lib.rs index 88bcbf0..b1cb009 100644 --- a/native/arb/src/lib.rs +++ b/native/arb/src/lib.rs @@ -7,7 +7,8 @@ extern crate rustler_codegen; extern crate arb; -use rustler::{NifEncoder, NifEnv, NifResult, NifTerm, types::NifListIterator}; +use rustler::types::ListIterator; +use rustler::{Encoder, Env, NifResult, Term}; mod atoms { rustler_atoms! { @@ -30,7 +31,7 @@ struct Options { pub verify: bool, } -fn arb_error_to_term<'a>(env: NifEnv<'a>, err: arb::Error) -> NifTerm<'a> { +fn arb_error_to_term<'a>(env: Env<'a>, err: arb::Error) -> Term<'a> { use arb::Error; let error = match err { @@ -47,8 +48,8 @@ fn arb_error_to_term<'a>(env: NifEnv<'a>, err: arb::Error) -> NifTerm<'a> { (atoms::error(), error).encode(env) } -fn activate<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult> { - let list_iterator: NifListIterator = args[0].decode()?; +fn activate<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult> { + let list_iterator: ListIterator = args[0].decode()?; let result: NifResult> = list_iterator .map(|x| x.decode::()) .collect::>>(); @@ -67,7 +68,7 @@ fn activate<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult> } } -fn get_active<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult> { +fn get_active<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult> { let port: Option = args[0].decode()?; let result = match arb::get_status(port) { @@ -88,7 +89,7 @@ fn get_active<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult> { +fn reset<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult> { let port: Option = args[0].decode()?; match arb::reset(port) {