speclatively use stdlib to have automatic no_std compatibility
This commit is contained in:
parent
6be9301a26
commit
0bd636a660
@ -3,10 +3,7 @@
|
||||
use crate::result::EvalAltResult;
|
||||
use crate::token::Position;
|
||||
|
||||
use crate::stdlib::{boxed::Box, char, error::Error, fmt, string::String};
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
use crate::alloc::string::ToString;
|
||||
use crate::stdlib::{boxed::Box, char, error::Error, fmt, string::{String, ToString}};
|
||||
|
||||
/// Error when tokenizing the script text.
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Hash)]
|
||||
|
@ -8,10 +8,7 @@ use crate::parser::{ImmutableString, INT};
|
||||
use crate::result::EvalAltResult;
|
||||
use crate::token::Position;
|
||||
|
||||
use crate::stdlib::{any::TypeId, boxed::Box};
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
use crate::alloc::string::ToString;
|
||||
use crate::stdlib::{any::TypeId, boxed::Box, string::ToString};
|
||||
|
||||
// Register array utility functions
|
||||
fn push<T: Variant + Clone>(list: &mut Array, item: T) -> FuncReturn<()> {
|
||||
|
@ -10,11 +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,
|
||||
boxed::Box,
|
||||
fmt::Display,
|
||||
format,
|
||||
string::{String, ToString},
|
||||
|
Loading…
Reference in New Issue
Block a user