Fix no-std build.

This commit is contained in:
Stephen Chung 2020-11-22 17:49:00 +08:00
parent d3f3894126
commit 6222f14fcb
3 changed files with 4 additions and 2 deletions

View File

@ -7,8 +7,10 @@ use crate::optimize::OptimizationLevel;
use crate::stdlib::{ use crate::stdlib::{
any::{type_name, TypeId}, any::{type_name, TypeId},
boxed::Box, boxed::Box,
format,
hash::{Hash, Hasher}, hash::{Hash, Hasher},
string::String, string::String,
vec::Vec,
}; };
use crate::utils::get_hasher; use crate::utils::get_hasher;
use crate::{ use crate::{

View File

@ -1,7 +1,7 @@
//! Module containing all built-in _packages_ available to Rhai, plus facilities to define custom packages. //! Module containing all built-in _packages_ available to Rhai, plus facilities to define custom packages.
use crate::fn_native::{CallableFunction, IteratorFn}; use crate::fn_native::{CallableFunction, IteratorFn};
use crate::stdlib::any::TypeId; use crate::stdlib::{any::TypeId, string::String};
use crate::{Module, Shared, StaticVec}; use crate::{Module, Shared, StaticVec};
pub(crate) mod arithmetic; pub(crate) mod arithmetic;

View File

@ -5,7 +5,7 @@ use super::logic::LogicPackage;
use super::string_basic::BasicStringPackage; use super::string_basic::BasicStringPackage;
use crate::fn_native::{CallableFunction, FnCallArgs}; use crate::fn_native::{CallableFunction, FnCallArgs};
use crate::stdlib::{any::TypeId, iter::empty}; use crate::stdlib::{any::TypeId, boxed::Box, iter::empty};
use crate::{ use crate::{
calc_script_fn_hash, def_package, FnAccess, FnNamespace, ImmutableString, NativeCallContext, calc_script_fn_hash, def_package, FnAccess, FnNamespace, ImmutableString, NativeCallContext,
INT, INT,