refactor: remove sys:napi_async_init() in AsyncWork

This commit is contained in:
Ouyang Yadong 2020-06-17 00:07:57 +08:00
parent a67d44c892
commit 9f49fd9b4e

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,