diff --git a/Cargo.toml b/Cargo.toml index fe3dffdc..57743468 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -111,4 +111,4 @@ instant= { version = "0.1" } # WASM implementation of std::time::Instant instant= { version = "0.1" } # WASM implementation of std::time::Instant [package.metadata.docs.rs] -features = [ "metadata", "internals" ] +features = [ "metadata", "internals", "decimal" ] diff --git a/src/dynamic.rs b/src/dynamic.rs index a220f86f..8e9e9efb 100644 --- a/src/dynamic.rs +++ b/src/dynamic.rs @@ -1357,10 +1357,10 @@ impl Dynamic { _ => Err(self.type_name()), } } - /// Cast the [`Dynamic`] as a [`Decimal`] and return it. + /// _(DECIMAL)_ Cast the [`Dynamic`] as a [`Decimal`] and return it. /// Returns the name of the actual type if the cast fails. /// - /// Available only under `decimal`. + /// Exported under the `decimal` feature only. #[cfg(feature = "decimal")] #[inline(always)] pub fn as_decimal(self) -> Result { diff --git a/src/module/mod.rs b/src/module/mod.rs index 0aba0ce7..2c3f1e51 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -1738,7 +1738,8 @@ impl Module { ) } - /// Get an iterator over all script-defined functions in the [`Module`]. + /// _(INTERNALS)_ Get an iterator over all script-defined functions in the [`Module`]. + /// Exported under the `internals` feature only. /// /// Function metadata includes: /// 1) Namespace ([`FnNamespace::Global`] or [`FnNamespace::Internal`]). @@ -1746,7 +1747,6 @@ impl Module { /// 3) Function name (as string slice). /// 4) Number of parameters. /// 5) _(INTERNALS)_ Shared reference to function definition [`ScriptFnDef`][crate::ast::ScriptFnDef]. - /// Exported under the `internals` feature only. #[cfg(not(feature = "no_function"))] #[cfg(feature = "internals")] #[inline(always)] diff --git a/src/packages/arithmetic.rs b/src/packages/arithmetic.rs index 817be5b5..0c96a6af 100644 --- a/src/packages/arithmetic.rs +++ b/src/packages/arithmetic.rs @@ -437,7 +437,7 @@ mod f64_functions { #[cfg(feature = "decimal")] #[export_module] -mod decimal_functions { +pub mod decimal_functions { use rust_decimal::{prelude::Zero, Decimal}; #[rhai_fn(skip, return_raw)]