Streamline string handling.

This commit is contained in:
Stephen Chung
2021-03-24 13:17:52 +08:00
parent 3a1e93e324
commit c4fe1782df
12 changed files with 129 additions and 82 deletions

View File

@@ -184,10 +184,12 @@ impl<'a> NativeCallContext<'a> {
#[inline(always)]
pub fn call_fn_dynamic_raw(
&self,
fn_name: &str,
fn_name: impl AsRef<str>,
is_method: bool,
args: &mut [&mut Dynamic],
) -> RhaiResult {
let fn_name = fn_name.as_ref();
let hash = if is_method {
FnCallHash::from_script_and_native(
calc_fn_hash(empty(), fn_name, args.len() - 1),