Fix no_std build.

This commit is contained in:
Stephen Chung 2021-03-01 09:30:23 +08:00
parent 8eee21ff38
commit 733f4af8b3
3 changed files with 7 additions and 2 deletions

View File

@ -17,7 +17,7 @@ use crate::stdlib::{
iter::{empty, once},
mem,
num::NonZeroU64,
string::ToString,
string::{String, ToString},
vec::Vec,
};
use crate::utils::combine_hashes;

View File

@ -2,6 +2,7 @@ use crate::dynamic::Variant;
use crate::stdlib::{
boxed::Box,
ops::{Add, Range},
string::ToString,
};
use crate::{def_package, EvalAltResult, Position, INT};

View File

@ -348,7 +348,11 @@ impl EvalAltResult {
pub(crate) fn dump_fields(&self, map: &mut crate::Map) {
map.insert(
"error".into(),
format!("{:?}", self).split('(').next().unwrap().into(),
crate::stdlib::format!("{:?}", self)
.split('(')
.next()
.unwrap()
.into(),
);
match self {