Skip to content

Commit 7dc43a7

Browse files
committed
Removed nodejs_14_6 and removed support for u64
1 parent 10f3f27 commit 7dc43a7

File tree

8 files changed

+31
-1026
lines changed

8 files changed

+31
-1026
lines changed

Cargo.lock

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/Cargo.lock

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nj-core/src/basic.rs

-12
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,6 @@ impl JsEnv {
141141
Ok(result)
142142
}
143143

144-
pub fn create_bigint_uint64(&self, value: u64) -> Result<napi_value,NjError> {
145-
let mut result = ptr::null_mut();
146-
napi_call_result!(
147-
crate::sys::napi_create_bigint_uint64(
148-
self.0,
149-
value,
150-
&mut result
151-
)
152-
)?;
153-
Ok(result)
154-
}
155-
156144
pub fn create_int32(&self,value: i32) -> Result<napi_value,NjError> {
157145

158146
let mut result = ptr::null_mut();

nj-core/src/convert.rs

-28
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ impl TryIntoJs for i64 {
3434
}
3535
}
3636

37-
impl TryIntoJs for u64 {
38-
39-
fn try_to_js(self, js_env: &JsEnv) -> Result<napi_value,NjError> {
40-
js_env.create_bigint_uint64(self)
41-
}
42-
}
43-
4437
impl TryIntoJs for i32 {
4538

4639
fn try_to_js(self, js_env: &JsEnv) -> Result<napi_value,NjError> {
@@ -183,27 +176,6 @@ impl JSValue<'_> for i64 {
183176
}
184177
}
185178

186-
impl JSValue<'_> for u64 {
187-
188-
fn convert_to_rust(env: &JsEnv,js_value: napi_value) -> Result<Self, NjError> {
189-
env.assert_type(js_value, crate::sys::napi_valuetype_napi_bigint)?;
190-
191-
let mut value: u64 = 0;
192-
let mut lossy: bool = false;
193-
194-
napi_call_result!(
195-
crate::sys::napi_get_value_bigint_uint64(
196-
env.inner(),
197-
js_value,
198-
&mut value,
199-
&mut lossy,
200-
)
201-
)?;
202-
203-
Ok(value)
204-
}
205-
}
206-
207179
impl JSValue<'_> for bool {
208180

209181
fn convert_to_rust(env: &JsEnv,js_value: napi_value) -> Result<Self,NjError> {

0 commit comments

Comments
 (0)