Refine inlining.

This commit is contained in:
Stephen Chung
2021-03-04 18:13:47 +08:00
parent 4e69b1847d
commit 0589572d19
10 changed files with 23 additions and 24 deletions

View File

@@ -183,7 +183,7 @@ macro_rules! def_register {
RET: Variant + Clone
> RegisterFn<FN, ($($mark,)*), RET> for Engine
{
#[inline]
#[inline(always)]
fn register_fn(&mut self, name: &str, f: FN) -> &mut Self {
self.global_namespace.set_fn(name, FnNamespace::Global, FnAccess::Public, None,
&[$(map_type_id::<$par>()),*],
@@ -198,7 +198,7 @@ macro_rules! def_register {
FN: Fn($($param),*) -> RhaiResult + SendSync + 'static,
> RegisterResultFn<FN, ($($mark,)*)> for Engine
{
#[inline]
#[inline(always)]
fn register_result_fn(&mut self, name: &str, f: FN) -> &mut Self {
self.global_namespace.set_fn(name, FnNamespace::Global, FnAccess::Public, None,
&[$(map_type_id::<$par>()),*],