FIx builds.

This commit is contained in:
Stephen Chung 2023-03-17 06:46:43 +08:00
parent 76ab1e290d
commit 95e7ec46ce

View File

@ -3,7 +3,6 @@
use crate::api::formatting::format_type;
use crate::module::{calc_native_fn_hash, FuncInfo, ModuleFlags};
use crate::parser::is_anonymous_fn;
use crate::{calc_fn_hash, Engine, FnAccess, SmartString, StaticVec, AST};
use serde::Serialize;
#[cfg(feature = "no_std")]
@ -35,6 +34,7 @@ struct FnMetadata<'a> {
pub namespace: crate::FnNamespace,
pub access: FnAccess,
pub name: &'a str,
#[cfg(not(feature = "no_function"))]
pub is_anonymous: bool,
#[serde(rename = "type")]
pub typ: FnType,
@ -85,7 +85,8 @@ impl<'a> From<&'a FuncInfo> for FnMetadata<'a> {
namespace: info.metadata.namespace,
access: info.metadata.access,
name: &info.metadata.name,
is_anonymous: is_anonymous_fn(&info.metadata.name),
#[cfg(not(feature = "no_function"))]
is_anonymous: crate::parser::is_anonymous_fn(&info.metadata.name),
typ,
num_params: info.metadata.num_params,
params: info