Merge pull request #72 from oyyd/chore

refactor: remove sys:napi_async_init() in AsyncWork
This commit is contained in:
LongYinan 2020-06-17 01:08:03 +08:00 committed by GitHub
commit 874851ea2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,11 +26,6 @@ impl<T: Task> AsyncWork<T> {
)
};
check_status(status)?;
let mut raw_context = ptr::null_mut();
unsafe {
let status = sys::napi_async_init(env, raw_resource, raw_name, &mut raw_context);
check_status(status)?;
};
let result = AsyncWork {
inner_task: task,
deferred,