speclatively use stdlib to have automatic no_std compatibility

This commit is contained in:
Steve Fan
2020-06-26 00:40:01 +08:00
parent 6be9301a26
commit 0bd636a660
3 changed files with 3 additions and 11 deletions

View File

@@ -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)]