changed hex_metadata.config
 
@@ -34,4 +34,4 @@
34
34
{<<"optional">>,false},
35
35
{<<"repository">>,<<"hexpm">>},
36
36
{<<"requirement">>,<<"~> 0.10">>}]]}.
37
- {<<"version">>,<<"0.15.0">>}.
37
+ {<<"version">>,<<"0.16.0">>}.
changed mix.exs
 
@@ -4,7 +4,7 @@ defmodule Gauc.Mixfile do
4
4
def project do
5
5
[
6
6
app: :gauc,
7
- version: "0.15.0",
7
+ version: "0.16.0",
8
8
elixir: "~> 1.5",
9
9
build_embedded: Mix.env == :prod,
10
10
start_permanent: Mix.env == :prod,
changed native/gauc/Cargo.toml
 
@@ -1,6 +1,6 @@
1
1
[package]
2
2
name = "gauc"
3
- version = "0.7.0"
3
+ version = "0.8.0"
4
4
authors = []
5
5
6
6
[lib]
changed native/gauc/src/lib.rs
 
@@ -19,7 +19,7 @@ extern crate uuid;
19
19
20
20
use byteorder::{BigEndian, ReadBytesExt};
21
21
22
- use rustler::{NifEnv, NifTerm, NifEncoder, NifResult};
22
+ use rustler::{Env, Term, Encoder, NifResult};
23
23
use rustler::resource::ResourceArc;
24
24
25
25
use std::collections::HashMap;
 
@@ -74,7 +74,7 @@ rustler_export_nifs! {
74
74
}
75
75
76
76
// TEST RESOURCE
77
- pub fn resource_make<'a>(env: NifEnv<'a>, _args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
77
+ pub fn resource_make<'a>(env: Env<'a>, _args: &[Term<'a>]) -> NifResult<Term<'a>> {
78
78
let data = Handle {
79
79
handle: RwLock::new((1, 42)),
80
80
};
 
@@ -84,12 +84,12 @@ pub fn resource_make<'a>(env: NifEnv<'a>, _args: &[NifTerm<'a>]) -> NifResult<Ni
84
84
Ok(resource.encode(env))
85
85
}
86
86
87
- fn on_load(env: NifEnv, _load_info: NifTerm) -> bool {
87
+ fn on_load(env: Env, _load_info: Term) -> bool {
88
88
resource_struct_init!(Handle, env);
89
89
true
90
90
}
91
91
92
- fn connect<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
92
+ fn connect<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
93
93
let connection_string: String = args[0].decode()?;
94
94
95
95
let username: String = args[1].decode()?;
 
@@ -120,7 +120,7 @@ fn connect<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>>
120
120
}
121
121
}
122
122
123
- fn disconnect<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
123
+ fn disconnect<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
124
124
let handle: (u32, u32) = args[0].decode()?;
125
125
126
126
match CLIENTS.lock().unwrap().remove(&handle) {
 
@@ -133,7 +133,7 @@ fn disconnect<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a
133
133
}
134
134
}
135
135
136
- fn clients<'a>(env: NifEnv<'a>, _args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
136
+ fn clients<'a>(env: Env<'a>, _args: &[Term<'a>]) -> NifResult<Term<'a>> {
137
137
let mut keys = Vec::new();
138
138
139
139
for (handle, client) in CLIENTS.lock().unwrap().iter() {
 
@@ -143,7 +143,7 @@ fn clients<'a>(env: NifEnv<'a>, _args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>>
143
143
Ok((atoms::ok(), keys).encode(env))
144
144
}
145
145
146
- fn add<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
146
+ fn add<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
147
147
let handle: (u32, u32) = args[0].decode()?;
148
148
let id: String = args[1].decode()?;
149
149
let doc: String = args[2].decode()?;
 
@@ -168,7 +168,7 @@ fn add<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
168
168
}
169
169
}
170
170
171
- fn append<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
171
+ fn append<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
172
172
let handle: (u32, u32) = args[0].decode()?;
173
173
let id: String = args[1].decode()?;
174
174
let doc: String = args[2].decode()?;
 
@@ -192,7 +192,7 @@ fn append<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
192
192
}
193
193
}
194
194
195
- fn get<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
195
+ fn get<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
196
196
let handle: (u32, u32) = args[0].decode()?;
197
197
let id: String = args[1].decode()?;
198
198
 
@@ -214,7 +214,7 @@ fn get<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
214
214
}
215
215
}
216
216
217
- fn prepend<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
217
+ fn prepend<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
218
218
let handle: (u32, u32) = args[0].decode()?;
219
219
let id: String = args[1].decode()?;
220
220
let doc: String = args[2].decode()?;
 
@@ -236,7 +236,7 @@ fn prepend<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>>
236
236
}
237
237
}
238
238
239
- fn remove<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
239
+ fn remove<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
240
240
let handle: (u32, u32) = args[0].decode()?;
241
241
let id: String = args[1].decode()?;
242
242
 
@@ -255,7 +255,7 @@ fn remove<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
255
255
}
256
256
}
257
257
258
- fn replace<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
258
+ fn replace<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
259
259
let handle: (u32, u32) = args[0].decode()?;
260
260
let id: String = args[1].decode()?;
261
261
let doc: String = args[2].decode()?;
 
@@ -279,7 +279,7 @@ fn replace<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>>
279
279
}
280
280
}
281
281
282
- fn set<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
282
+ fn set<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
283
283
let handle: (u32, u32) = args[0].decode()?;
284
284
let id: String = args[1].decode()?;
285
285
let doc: String = args[2].decode()?;
 
@@ -303,7 +303,7 @@ fn set<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
303
303
}
304
304
}
305
305
306
- fn upsert<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
306
+ fn upsert<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
307
307
let handle: (u32, u32) = args[0].decode()?;
308
308
let id: String = args[1].decode()?;
309
309
let doc: String = args[2].decode()?;
 
@@ -327,7 +327,7 @@ fn upsert<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
327
327
}
328
328
}
329
329
330
- fn query_view<'a>(env: NifEnv<'a>, args: &[NifTerm<'a>]) -> NifResult<NifTerm<'a>> {
330
+ fn query_view<'a>(env: Env<'a>, args: &[Term<'a>]) -> NifResult<Term<'a>> {
331
331
let handle: (u32, u32) = args[0].decode()?;
332
332
let ddoc: String = args[1].decode()?;
333
333
let name: String = args[2].decode()?;