diff --git a/crates/neon/src/lib.rs b/crates/neon/src/lib.rs index 7b153a766..8f1030cda 100644 --- a/crates/neon/src/lib.rs +++ b/crates/neon/src/lib.rs @@ -178,18 +178,21 @@ pub struct Exports(()); impl Exports { /// Export all values exported with [`neon::export`](export) /// - /// ```ignore + /// ``` + /// # fn main() { /// # use neon::prelude::*; /// #[neon::main] /// fn main(mut cx: ModuleContext) -> NeonResult<()> { /// neon::registered().export(&mut cx)?; /// Ok(()) /// } + /// # } /// ``` /// /// For more control, iterate over exports. /// - /// ```ignore + /// ``` + /// # fn main() { /// # use neon::prelude::*; /// #[neon::main] /// fn main(mut cx: ModuleContext) -> NeonResult<()> { @@ -201,6 +204,7 @@ impl Exports { /// /// Ok(()) /// } + /// # } /// ``` pub fn export(self, cx: &mut ModuleContext) -> NeonResult<()> { for create in self { @@ -238,6 +242,7 @@ fn feature_matrix() { const EXTERNAL_BUFFERS: &str = "external-buffers"; const FUTURES: &str = "futures"; const SERDE: &str = "serde"; + const TOKIO: &str = "tokio"; const NODE_API_VERSIONS: &[&str] = &[ "napi-1", "napi-2", "napi-3", "napi-4", "napi-5", "napi-6", "napi-7", "napi-8", ]; @@ -249,10 +254,18 @@ fn feature_matrix() { &[EXTERNAL_BUFFERS], &[FUTURES], &[SERDE], + &[TOKIO], &[EXTERNAL_BUFFERS, FUTURES], &[EXTERNAL_BUFFERS, SERDE], + &[EXTERNAL_BUFFERS, TOKIO], &[FUTURES, SERDE], + &[FUTURES, TOKIO], + &[SERDE, TOKIO], &[EXTERNAL_BUFFERS, FUTURES, SERDE], + &[EXTERNAL_BUFFERS, FUTURES, TOKIO], + &[EXTERNAL_BUFFERS, SERDE, TOKIO], + &[FUTURES, SERDE, TOKIO], + &[EXTERNAL_BUFFERS, FUTURES, SERDE, TOKIO], ]; let cargo = env::var_os("CARGO").unwrap_or_else(|| "cargo".into()); diff --git a/crates/neon/src/sys/bindings/mod.rs b/crates/neon/src/sys/bindings/mod.rs index cdd8559e1..7e318652e 100644 --- a/crates/neon/src/sys/bindings/mod.rs +++ b/crates/neon/src/sys/bindings/mod.rs @@ -39,7 +39,7 @@ macro_rules! napi_name { /// /// Sample input: /// -/// ```ignore +/// ```skip /// extern "C" { /// fn get_undefined(env: Env, result: *mut Value) -> Status; /// /* Additional functions may be included */ @@ -48,7 +48,7 @@ macro_rules! napi_name { /// /// Generated output: /// -/// ```ignore +/// ```skip /// // Each field is a pointer to a N-API function /// struct Napi { /// get_undefined: unsafe extern "C" fn(env: Env, result: *mut Value) -> Status, diff --git a/crates/neon/src/types_impl/buffer/types.rs b/crates/neon/src/types_impl/buffer/types.rs index 6b499d66c..8af9df4cd 100644 --- a/crates/neon/src/types_impl/buffer/types.rs +++ b/crates/neon/src/types_impl/buffer/types.rs @@ -765,7 +765,7 @@ where /// Note that, depending on the element size, this is not necessarily the same as /// [`size()`](crate::types::buffer::TypedArray::size). In particular: /// - /// ```ignore + /// ```skip /// self.size() == self.len() * size_of::() /// ``` #[allow(clippy::len_without_is_empty)] diff --git a/crates/neon/src/types_impl/date.rs b/crates/neon/src/types_impl/date.rs index 54ffcd44a..bbdff45a2 100644 --- a/crates/neon/src/types_impl/date.rs +++ b/crates/neon/src/types_impl/date.rs @@ -23,6 +23,8 @@ use crate::{ /// [`SystemTime`](std::time::SystemTime) timestamps to JavaScript `Date` objects. /// /// ``` +/// # #[cfg(feature = "easy-cast")] +/// # { /// # use neon::prelude::*; /// use easy_cast::Cast; // for safe numeric conversions /// use neon::types::JsDate; @@ -45,6 +47,7 @@ use crate::{ /// .and_then(|n| Ok(cx.date(n)?)) /// .or_else(|err| cx.throw_error(err.to_string())) /// } +/// # } /// ``` #[cfg_attr(docsrs, doc(cfg(feature = "napi-5")))] #[derive(Debug)]