From cce5f1fe00fac6bad9b9e91dc4401627631f9cff Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 14 Jul 2020 23:52:42 +0800 Subject: [PATCH] fix(napi): missing declaration in register_module macro --- napi/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/napi/src/lib.rs b/napi/src/lib.rs index 3a274512..108336c6 100644 --- a/napi/src/lib.rs +++ b/napi/src/lib.rs @@ -101,7 +101,9 @@ pub use tokio_rt::shutdown as shutdown_tokio_rt; macro_rules! register_module { ($module_name:ident, $init:ident) => { #[inline] + #[cfg(all(feature = "tokio_rt", napi4))] fn check_status(code: $crate::sys::napi_status) -> Result<()> { + use $crate::{Error, Status}; let status = Status::from(code); match status { Status::Ok => Ok(()),