From 9f49fd9b4e7e111a989a6e797792b72dce4f6638 Mon Sep 17 00:00:00 2001 From: Ouyang Yadong Date: Wed, 17 Jun 2020 00:07:57 +0800 Subject: [PATCH] refactor: remove sys:napi_async_init() in AsyncWork --- napi/src/async_work.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/napi/src/async_work.rs b/napi/src/async_work.rs index e6f57b3c..27ceef5c 100644 --- a/napi/src/async_work.rs +++ b/napi/src/async_work.rs @@ -26,11 +26,6 @@ impl AsyncWork { ) }; 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,