Fix no_std.

This commit is contained in:
Stephen Chung 2020-10-29 12:00:02 +08:00
parent 4e115d2bc2
commit a73584cd36
3 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@ use crate::engine::{make_getter, make_setter, Map};
use crate::stdlib::{ use crate::stdlib::{
any::TypeId, any::TypeId,
borrow::Cow, borrow::Cow,
boxed::Box,
fmt, fmt,
hash::{Hash, Hasher}, hash::{Hash, Hasher},
num::NonZeroUsize, num::NonZeroUsize,

View File

@ -456,7 +456,7 @@ impl<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> EvalContext<'e, 'x, 'px, 'a, 's, 'm,
#[cfg(feature = "internals")] #[cfg(feature = "internals")]
#[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_module"))]
#[inline(always)] #[inline(always)]
pub fn imports<'z: 'a>(&'z self) -> &'a Imports { pub fn imports(&'a self) -> &'a Imports {
self.mods self.mods
} }
/// Get an iterator over the namespaces containing definition of all script-defined functions. /// Get an iterator over the namespaces containing definition of all script-defined functions.

View File

@ -10,7 +10,7 @@ use crate::utils::{ImmutableString, StraightHasherBuilder};
use crate::{calc_native_fn_hash, calc_script_fn_hash, StaticVec}; use crate::{calc_native_fn_hash, calc_script_fn_hash, StaticVec};
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]
use crate::{fn_native::Shared, ast::ScriptFnDef}; use crate::{ast::ScriptFnDef, fn_native::Shared};
#[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_module"))]
use crate::{ use crate::{