fix(napi): missing declaration in register_module macro
This commit is contained in:
parent
3f2b6c230e
commit
cce5f1fe00
1 changed files with 2 additions and 0 deletions
|
@ -101,7 +101,9 @@ pub use tokio_rt::shutdown as shutdown_tokio_rt;
|
||||||
macro_rules! register_module {
|
macro_rules! register_module {
|
||||||
($module_name:ident, $init:ident) => {
|
($module_name:ident, $init:ident) => {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[cfg(all(feature = "tokio_rt", napi4))]
|
||||||
fn check_status(code: $crate::sys::napi_status) -> Result<()> {
|
fn check_status(code: $crate::sys::napi_status) -> Result<()> {
|
||||||
|
use $crate::{Error, Status};
|
||||||
let status = Status::from(code);
|
let status = Status::from(code);
|
||||||
match status {
|
match status {
|
||||||
Status::Ok => Ok(()),
|
Status::Ok => Ok(()),
|
||||||
|
|
Loading…
Reference in a new issue