re-add core crates packages on no_std which is not imported

This commit is contained in:
Steve Fan 2020-06-25 23:24:35 +08:00 committed by Steve Fan
parent ec5511fecf
commit 6be9301a26
3 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,9 @@ use crate::token::Position;
use crate::stdlib::{boxed::Box, char, error::Error, fmt, string::String};
#[cfg(feature = "no_std")]
use crate::alloc::string::ToString;
/// Error when tokenizing the script text.
#[derive(Debug, Eq, PartialEq, Clone, Hash)]
pub enum LexError {

View File

@ -10,6 +10,9 @@ use crate::token::Position;
use crate::stdlib::{any::TypeId, boxed::Box};
#[cfg(feature = "no_std")]
use crate::alloc::string::ToString;
// Register array utility functions
fn push<T: Variant + Clone>(list: &mut Array, item: T) -> FuncReturn<()> {
list.push(Dynamic::from(item));

View File

@ -10,6 +10,9 @@ use crate::utils::StaticVec;
#[cfg(not(feature = "no_index"))]
use crate::engine::Array;
#[cfg(feature = "no_std")]
use crate::alloc::boxed::Box;
use crate::stdlib::{
any::TypeId,
fmt::Display,