Reduce nesting in plugin sub-modules.

This commit is contained in:
Stephen Chung
2021-10-20 16:22:12 +08:00
parent ae493918a2
commit 313999b0ac
4 changed files with 126 additions and 142 deletions

View File

@@ -15,20 +15,16 @@ mod fn_ptr_functions {
}
#[cfg(not(feature = "no_function"))]
pub mod functions {
#[rhai_fn(name = "is_anonymous", get = "is_anonymous", pure)]
pub fn is_anonymous(fn_ptr: &mut FnPtr) -> bool {
fn_ptr.is_anonymous()
}
#[rhai_fn(name = "is_anonymous", get = "is_anonymous", pure)]
pub fn is_anonymous(fn_ptr: &mut FnPtr) -> bool {
fn_ptr.is_anonymous()
}
#[cfg(not(feature = "no_function"))]
#[cfg(not(feature = "no_index"))]
#[cfg(not(feature = "no_object"))]
pub mod functions_and_maps {
pub fn get_fn_metadata_list(ctx: NativeCallContext) -> crate::Array {
collect_fn_metadata(ctx)
}
pub fn get_fn_metadata_list(ctx: NativeCallContext) -> crate::Array {
collect_fn_metadata(ctx)
}
}