Update deprecated methods with since attribute.

This commit is contained in:
Stephen Chung
2021-03-28 17:04:16 +08:00
parent 7825cb1c56
commit 8e8c367034
3 changed files with 28 additions and 18 deletions

View File

@@ -859,12 +859,10 @@ impl Engine {
self
}
/// Register a shared [`Module`] into the global namespace of [`Engine`].
///
/// # Deprecated
///
/// This function is deprecated and will be removed in the future.
/// Use [`register_global_module`][Engine::register_global_module] instead.
#[inline(always)]
#[deprecated = "use `register_global_module` instead"]
#[deprecated(since = "0.19.9", note = "use `register_global_module` instead")]
pub fn load_package(&mut self, module: impl Into<Shared<Module>>) -> &mut Self {
self.register_global_module(module.into())
}
@@ -947,13 +945,11 @@ impl Engine {
}
/// Register a shared [`Module`] as a static module namespace with the [`Engine`].
///
/// # Deprecated
///
/// This function is deprecated and will be removed in the future.
/// Use [`register_static_module`][Engine::register_static_module] instead.
#[cfg(not(feature = "no_module"))]
#[inline(always)]
#[deprecated = "use `register_static_module` instead"]
#[deprecated(since = "0.19.9", note = "use `register_static_module` instead")]
pub fn register_module(
&mut self,
name: impl AsRef<str> + Into<ImmutableString>,