Use ImmutableString in more places.

This commit is contained in:
Stephen Chung
2022-10-29 14:59:20 +08:00
parent 8e35f98477
commit 91415b9750
11 changed files with 45 additions and 85 deletions

View File

@@ -27,7 +27,7 @@ mod fn_ptr_functions {
/// ```
#[rhai_fn(name = "name", get = "name", pure)]
pub fn name(fn_ptr: &mut FnPtr) -> ImmutableString {
fn_ptr.fn_name_raw().into()
fn_ptr.fn_name_raw().clone()
}
/// Return `true` if the function is an anonymous function.