Skip to content

Commit

Permalink
Merge pull request #957 from schungx/master
Browse files Browse the repository at this point in the history
Prepare 1.21.0 release
  • Loading branch information
schungx authored Jan 25, 2025
2 parents 4ead53e + e957b2b commit a85b9c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "codegen"]

[package]
name = "rhai"
version = "1.20.1"
version = "1.21.0"
rust-version = "1.66.0"
edition = "2018"
resolver = "2"
Expand Down
19 changes: 19 additions & 0 deletions src/types/fn_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ impl FnPtr {
/// # Errors
///
/// Returns an error if the function name is not a valid identifier or is a reserved keyword.
///
/// # WARNING - Unstable API
///
/// This API is volatile and may change in the future.
///
/// # Callback Function Signature
///
/// `Fn(context: NativeCallContext, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult>>`
#[deprecated = "This API is NOT deprecated, but it is considered volatile and may change in the future."]
#[inline(always)]
pub fn from_fn(
name: impl Into<ImmutableString>,
Expand All @@ -109,13 +118,23 @@ impl FnPtr {
+ Sync
+ 'static,
) -> RhaiResultOf<Self> {
#[allow(deprecated)]
Self::from_dyn_fn(name, Box::new(func))
}
/// Create a new function pointer from a native Rust function.
///
/// # Errors
///
/// Returns an error if the function name is not a valid identifier or is a reserved keyword.
///
/// # WARNING - Unstable API
///
/// This API is volatile and may change in the future.
///
/// # Callback Function Signature
///
/// `Fn(context: NativeCallContext, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult>>`
#[deprecated = "This API is NOT deprecated, but it is considered volatile and may change in the future."]
#[inline]
pub fn from_dyn_fn(
name: impl Into<ImmutableString>,
Expand Down

0 comments on commit a85b9c1

Please sign in to comment.