style(napi): typo adjust
This commit is contained in:
parent
f4a331cfe2
commit
04238c38ab
2 changed files with 6 additions and 10 deletions
|
@ -197,9 +197,9 @@ impl Env {
|
|||
};
|
||||
check_status(status)?;
|
||||
let mut changed = 0;
|
||||
let ajust_external_memory_status =
|
||||
let adjust_external_memory_status =
|
||||
unsafe { sys::napi_adjust_external_memory(self.0, length as i64, &mut changed) };
|
||||
check_status(ajust_external_memory_status)?;
|
||||
check_status(adjust_external_memory_status)?;
|
||||
mem::forget(data);
|
||||
let mut buffer = JsBuffer::from_raw_unchecked(self.0, raw_value);
|
||||
buffer.data = data_ptr as *const u8;
|
||||
|
@ -239,9 +239,9 @@ impl Env {
|
|||
};
|
||||
check_status(status)?;
|
||||
let mut changed = 0;
|
||||
let ajust_external_memory_status =
|
||||
let adjust_external_memory_status =
|
||||
unsafe { sys::napi_adjust_external_memory(self.0, length as i64, &mut changed) };
|
||||
check_status(ajust_external_memory_status)?;
|
||||
check_status(adjust_external_memory_status)?;
|
||||
mem::forget(data);
|
||||
let mut array_buffer = JsArrayBuffer::from_raw_unchecked(self.0, raw_value);
|
||||
array_buffer.data = data_ptr as *const u8;
|
||||
|
@ -541,9 +541,9 @@ unsafe extern "C" fn drop_buffer(env: sys::napi_env, finalize_data: *mut c_void,
|
|||
let length = *length as usize;
|
||||
let _ = Vec::from_raw_parts(finalize_data as *mut u8, length, length);
|
||||
let mut changed = 0;
|
||||
let ajust_external_memory_status =
|
||||
let adjust_external_memory_status =
|
||||
sys::napi_adjust_external_memory(env, -(length as i64), &mut changed);
|
||||
debug_assert!(Status::from(ajust_external_memory_status) == Status::Ok);
|
||||
debug_assert!(Status::from(adjust_external_memory_status) == Status::Ok);
|
||||
}
|
||||
|
||||
unsafe extern "C" fn raw_finalize<T>(
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
Loading…
Reference in a new issue