From db3049e5741be4cd506d453e30419266838dc39f Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 23 Aug 2021 23:10:54 +0800 Subject: [PATCH] Engine::register_type_XXX available under no_object. --- CHANGELOG.md | 1 + src/engine_api.rs | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c12e8938..e1c751a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Enhancements * `Scope::set_value` now takes anything that implements `Into>`. * Added `Scope::is_constant` to check if a variable is constant. * Added `Scope::set_or_push` to add a new variable only if one doesn't already exist. +* `Engine::register_type_XXX` are now available even under `no_object`. Version 1.0.2 diff --git a/src/engine_api.rs b/src/engine_api.rs index 181e59d8..7156a2a1 100644 --- a/src/engine_api.rs +++ b/src/engine_api.rs @@ -184,8 +184,6 @@ impl Engine { /// Register a custom type for use with the [`Engine`]. /// The type must implement [`Clone`]. /// - /// Not available under `no_object`. - /// /// # Example /// /// ``` @@ -219,7 +217,6 @@ impl Engine { /// # Ok(()) /// # } /// ``` - #[cfg(not(feature = "no_object"))] #[inline(always)] pub fn register_type(&mut self) -> &mut Self { self.register_type_with_name::(type_name::()) @@ -227,8 +224,6 @@ impl Engine { /// Register a custom type for use with the [`Engine`], with a pretty-print name /// for the `type_of` function. The type must implement [`Clone`]. /// - /// Not available under `no_object`. - /// /// # Example /// /// ``` @@ -266,7 +261,6 @@ impl Engine { /// # Ok(()) /// # } /// ``` - #[cfg(not(feature = "no_object"))] #[inline(always)] pub fn register_type_with_name(&mut self, name: &str) -> &mut Self { // Add the pretty-print type name into the map