From f7c8238613790c9cc6870519e302b2504106eed9 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sat, 19 Nov 2022 19:04:28 +0800 Subject: [PATCH] Remove volatile warning from TypeBuilder API. --- CHANGELOG.md | 1 + src/api/build_type.rs | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b1bbd6..a615b018 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Enhancements ------------ * `CallableFunction` is exported under `internals`. +* The `TypeBuilder` type and `CustomType` trait are no longer marked as volatile. Version 1.11.0 diff --git a/src/api/build_type.rs b/src/api/build_type.rs index 2ebab673..c72196b4 100644 --- a/src/api/build_type.rs +++ b/src/api/build_type.rs @@ -1,6 +1,4 @@ //! Trait to build a custom type for use with [`Engine`]. -#![allow(deprecated)] - use crate::{types::dynamic::Variant, Engine, Identifier, RegisterNativeFunction}; use std::marker::PhantomData; #[cfg(feature = "no_std")] @@ -12,10 +10,6 @@ use crate::func::register::Mut; /// Trait to build the API of a custom type for use with an [`Engine`] /// (i.e. register the type and its getters, setters, methods, etc.). /// -/// # WARNING - Volatile Trait -/// -/// This API is volatile and may change in the future. -/// /// # Example /// /// ``` @@ -66,7 +60,6 @@ use crate::func::register::Mut; /// # Ok(()) /// # } /// ``` -#[deprecated = "This trait is NOT deprecated, but it is considered volatile and may change in the future."] pub trait CustomType: Variant + Clone { /// Builds the custom type for use with the [`Engine`]. /// @@ -78,10 +71,6 @@ impl Engine { /// Build the API of a custom type for use with the [`Engine`]. /// /// The custom type must implement [`CustomType`]. - /// - /// # WARNING - Unstable API - /// - /// This API is volatile and may change in the future. #[inline] pub fn build_type(&mut self) -> &mut Self { T::build(TypeBuilder::new(self)); @@ -99,11 +88,6 @@ impl Engine { /// /// To define a pretty-print name, call [`with_name`][`TypeBuilder::with_name`], /// to use [`Engine::register_type_with_name`] instead. -/// -/// # WARNING - Volatile Type -/// -/// This type is volatile and may change in the future. -#[deprecated = "This type is NOT deprecated, but it is considered volatile and may change in the future."] pub struct TypeBuilder<'a, T: Variant + Clone> { engine: &'a mut Engine, name: Option<&'static str>,