From 6222f14fcb7db40034524da11d6a3f0851f268d5 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sun, 22 Nov 2020 17:49:00 +0800 Subject: [PATCH] Fix no-std build. --- src/engine_api.rs | 2 ++ src/packages/mod.rs | 2 +- src/packages/pkg_core.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine_api.rs b/src/engine_api.rs index 0d7023f6..b801a33c 100644 --- a/src/engine_api.rs +++ b/src/engine_api.rs @@ -7,8 +7,10 @@ use crate::optimize::OptimizationLevel; use crate::stdlib::{ any::{type_name, TypeId}, boxed::Box, + format, hash::{Hash, Hasher}, string::String, + vec::Vec, }; use crate::utils::get_hasher; use crate::{ diff --git a/src/packages/mod.rs b/src/packages/mod.rs index 3b6669c7..bc764554 100644 --- a/src/packages/mod.rs +++ b/src/packages/mod.rs @@ -1,7 +1,7 @@ //! Module containing all built-in _packages_ available to Rhai, plus facilities to define custom packages. use crate::fn_native::{CallableFunction, IteratorFn}; -use crate::stdlib::any::TypeId; +use crate::stdlib::{any::TypeId, string::String}; use crate::{Module, Shared, StaticVec}; pub(crate) mod arithmetic; diff --git a/src/packages/pkg_core.rs b/src/packages/pkg_core.rs index 8335c126..7480fdd1 100644 --- a/src/packages/pkg_core.rs +++ b/src/packages/pkg_core.rs @@ -5,7 +5,7 @@ use super::logic::LogicPackage; use super::string_basic::BasicStringPackage; use crate::fn_native::{CallableFunction, FnCallArgs}; -use crate::stdlib::{any::TypeId, iter::empty}; +use crate::stdlib::{any::TypeId, boxed::Box, iter::empty}; use crate::{ calc_script_fn_hash, def_package, FnAccess, FnNamespace, ImmutableString, NativeCallContext, INT,