Refactor FnCallHashes.
This commit is contained in:
@@ -457,14 +457,15 @@ impl<'a> NativeCallContext<'a> {
|
||||
|
||||
// Native or script
|
||||
|
||||
let hash = if is_method_call {
|
||||
FnCallHashes::from_all(
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
let hash = match is_method_call {
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
true => FnCallHashes::from_script_and_native(
|
||||
calc_fn_hash(None, fn_name, args_len - 1),
|
||||
calc_fn_hash(None, fn_name, args_len),
|
||||
)
|
||||
} else {
|
||||
calc_fn_hash(None, fn_name, args_len).into()
|
||||
),
|
||||
#[cfg(feature = "no_function")]
|
||||
true => FnCallHashes::from_native_only(calc_fn_hash(None, fn_name, args_len)),
|
||||
_ => FnCallHashes::from_hash(calc_fn_hash(None, fn_name, args_len)),
|
||||
};
|
||||
|
||||
self.engine()
|
||||
|
Reference in New Issue
Block a user