Fix builds.

This commit is contained in:
Stephen Chung 2021-12-21 16:36:53 +08:00
parent b85a9b3c1c
commit f9f3615878

View File

@ -10,7 +10,7 @@ use crate::tokenizer::Token;
use crate::types::dynamic::Variant; use crate::types::dynamic::Variant;
use crate::{ use crate::{
calc_fn_params_hash, calc_qualified_fn_hash, combine_hashes, Dynamic, EvalAltResult, calc_fn_params_hash, calc_qualified_fn_hash, combine_hashes, Dynamic, EvalAltResult,
Identifier, ImmutableString, NativeCallContext, Shared, SmartString, StaticVec, Identifier, ImmutableString, NativeCallContext, Shared, StaticVec,
}; };
#[cfg(feature = "no_std")] #[cfg(feature = "no_std")]
use std::prelude::v1::*; use std::prelude::v1::*;
@ -55,7 +55,7 @@ pub struct FuncInfo {
pub return_type_name: Identifier, pub return_type_name: Identifier,
/// Comments. /// Comments.
#[cfg(feature = "metadata")] #[cfg(feature = "metadata")]
pub comments: SmartString, pub comments: crate::SmartString,
} }
impl FuncInfo { impl FuncInfo {
@ -495,7 +495,7 @@ impl Module {
comments: fn_def comments: fn_def
.comments .comments
.as_ref() .as_ref()
.map_or(SmartString::new_const(), |v| v.join("\n").into()), .map_or(crate::SmartString::new_const(), |v| v.join("\n").into()),
func: Into::<CallableFunction>::into(fn_def).into(), func: Into::<CallableFunction>::into(fn_def).into(),
} }
.into(), .into(),
@ -759,7 +759,7 @@ impl Module {
#[cfg(feature = "metadata")] #[cfg(feature = "metadata")]
return_type_name, return_type_name,
#[cfg(feature = "metadata")] #[cfg(feature = "metadata")]
comments: SmartString::new_const(), comments: crate::SmartString::new_const(),
func: func.into(), func: func.into(),
} }
.into(), .into(),
@ -797,7 +797,7 @@ impl Module {
access: FnAccess, access: FnAccess,
arg_names: Option<&[&str]>, arg_names: Option<&[&str]>,
arg_types: &[TypeId], arg_types: &[TypeId],
comment: impl Into<SmartString>, comment: impl Into<crate::SmartString>,
func: CallableFunction, func: CallableFunction,
) -> u64 { ) -> u64 {
let hash = self.set_fn(name, namespace, access, arg_names, arg_types, func); let hash = self.set_fn(name, namespace, access, arg_names, arg_types, func);