Split tokenizer into separate file, plus fix no_std feature.
This commit is contained in:
@@ -10,9 +10,12 @@ use crate::stdlib::{
|
||||
any::{type_name, Any, TypeId},
|
||||
boxed::Box,
|
||||
fmt,
|
||||
time::Instant,
|
||||
string::String,
|
||||
};
|
||||
|
||||
#[cfg(not(feature = "no_std"))]
|
||||
use crate::stdlib::time::Instant;
|
||||
|
||||
/// A trait to represent any type.
|
||||
///
|
||||
/// Currently, `Variant` is not `Send` nor `Sync`, so it can practically be any type.
|
||||
@@ -186,6 +189,7 @@ impl Dynamic {
|
||||
Union::Array(_) => "array",
|
||||
Union::Map(_) => "map",
|
||||
|
||||
#[cfg(not(feature = "no_std"))]
|
||||
Union::Variant(value) if value.is::<Instant>() => "timestamp",
|
||||
Union::Variant(value) => (**value).type_name(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user