no_std = no_time.
This commit is contained in:
parent
a6a570131a
commit
45f0fdcbe0
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -60,10 +60,11 @@ jobs:
|
|||||||
- "--features no_object,serde,metadata,internals,debugging"
|
- "--features no_object,serde,metadata,internals,debugging"
|
||||||
- "--features no_function,serde,metadata,internals,debugging"
|
- "--features no_function,serde,metadata,internals,debugging"
|
||||||
- "--features no_module,serde,metadata,internals,debugging"
|
- "--features no_module,serde,metadata,internals,debugging"
|
||||||
|
- "--features no_time,serde,metadata,internals,debugging"
|
||||||
- "--features no_closure,serde,metadata,internals,debugging"
|
- "--features no_closure,serde,metadata,internals,debugging"
|
||||||
- "--features unicode-xid-ident,serde,metadata,internals,debugging"
|
- "--features unicode-xid-ident,serde,metadata,internals,debugging"
|
||||||
- "--features sync,no_function,no_float,no_position,no_optimize,no_module,no_closure,no_custom_syntax,metadata,serde,unchecked,debugging"
|
- "--features sync,no_time,no_function,no_float,no_position,no_optimize,no_module,no_closure,no_custom_syntax,metadata,serde,unchecked,debugging"
|
||||||
- "--features no_function,no_float,no_position,no_index,no_object,no_optimize,no_module,no_closure,no_custom_syntax,unchecked"
|
- "--features no_time,no_function,no_float,no_position,no_index,no_object,no_optimize,no_module,no_closure,no_custom_syntax,unchecked"
|
||||||
toolchain: [stable]
|
toolchain: [stable]
|
||||||
experimental: [false]
|
experimental: [false]
|
||||||
include:
|
include:
|
||||||
|
@ -53,11 +53,11 @@ only_i64 = [] # set INT=i64 (default) and disable support for
|
|||||||
decimal = ["rust_decimal"] # add the Decimal number type
|
decimal = ["rust_decimal"] # add the Decimal number type
|
||||||
no_index = [] # no arrays and indexing
|
no_index = [] # no arrays and indexing
|
||||||
no_object = [] # no custom objects
|
no_object = [] # no custom objects
|
||||||
|
no_time = [] # no timestamps
|
||||||
no_function = ["no_closure"] # no script-defined functions (meaning no closures)
|
no_function = ["no_closure"] # no script-defined functions (meaning no closures)
|
||||||
no_closure = [] # no automatic sharing and capture of anonymous functions to external variables
|
no_closure = [] # no automatic sharing and capture of anonymous functions to external variables
|
||||||
no_module = [] # no modules
|
no_module = [] # no modules
|
||||||
no_custom_syntax = [] # no custom syntax or custom operators
|
no_custom_syntax = [] # no custom syntax or custom operators
|
||||||
no_time = [] # no timestamps
|
|
||||||
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
|
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
|
||||||
metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"] # enable exporting functions metadata
|
metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"] # enable exporting functions metadata
|
||||||
internals = [] # expose internal data structures
|
internals = [] # expose internal data structures
|
||||||
@ -65,7 +65,7 @@ debugging = ["internals"] # enable debugging
|
|||||||
serde = ["dep:serde", "smartstring/serde", "smallvec/serde"] # implement serde for rhai types
|
serde = ["dep:serde", "smartstring/serde", "smallvec/serde"] # implement serde for rhai types
|
||||||
|
|
||||||
# compiling for no-std
|
# compiling for no-std
|
||||||
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "hashbrown"]
|
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "hashbrown", "no_time"]
|
||||||
|
|
||||||
# compiling for WASM
|
# compiling for WASM
|
||||||
wasm-bindgen = ["instant/wasm-bindgen"]
|
wasm-bindgen = ["instant/wasm-bindgen"]
|
||||||
|
@ -555,7 +555,6 @@ fn def_type_name<'a>(ty: &'a str, engine: &'a Engine) -> Cow<'a, str> {
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
let ty = ty.replace(type_name::<crate::Map>(), "Map");
|
let ty = ty.replace(type_name::<crate::Map>(), "Map");
|
||||||
|
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
let ty = ty.replace(type_name::<crate::Instant>(), "Instant");
|
let ty = ty.replace(type_name::<crate::Instant>(), "Instant");
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ fn map_std_type_name(name: &str, shorthands: bool) -> &str {
|
|||||||
if name == type_name::<crate::Map>() || name == "Map" {
|
if name == type_name::<crate::Map>() || name == "Map" {
|
||||||
return if shorthands { "map" } else { "Map" };
|
return if shorthands { "map" } else { "Map" };
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
if name == type_name::<crate::Instant>() || name == "Instant" {
|
if name == type_name::<crate::Instant>() || name == "Instant" {
|
||||||
return if shorthands { "timestamp" } else { "Instant" };
|
return if shorthands { "timestamp" } else { "Instant" };
|
||||||
|
@ -204,7 +204,6 @@ pub use eval::EvalContext;
|
|||||||
pub use func::{NativeCallContext, RegisterNativeFunction};
|
pub use func::{NativeCallContext, RegisterNativeFunction};
|
||||||
pub use module::{FnNamespace, Module};
|
pub use module::{FnNamespace, Module};
|
||||||
pub use tokenizer::Position;
|
pub use tokenizer::Position;
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
pub use types::Instant;
|
pub use types::Instant;
|
||||||
pub use types::{
|
pub use types::{
|
||||||
|
@ -38,7 +38,6 @@ pub use pkg_core::CorePackage;
|
|||||||
pub use pkg_std::StandardPackage;
|
pub use pkg_std::StandardPackage;
|
||||||
pub use string_basic::BasicStringPackage;
|
pub use string_basic::BasicStringPackage;
|
||||||
pub use string_more::MoreStringPackage;
|
pub use string_more::MoreStringPackage;
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
pub use time_basic::BasicTimePackage;
|
pub use time_basic::BasicTimePackage;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ def_package! {
|
|||||||
#[cfg(not(feature = "no_index"))] BasicArrayPackage,
|
#[cfg(not(feature = "no_index"))] BasicArrayPackage,
|
||||||
#[cfg(not(feature = "no_index"))] BasicBlobPackage,
|
#[cfg(not(feature = "no_index"))] BasicBlobPackage,
|
||||||
#[cfg(not(feature = "no_object"))] BasicMapPackage,
|
#[cfg(not(feature = "no_object"))] BasicMapPackage,
|
||||||
#[cfg(all(not(feature = "no_std"), not(feature = "no_time")))] BasicTimePackage,
|
#[cfg(not(feature = "no_time"))] BasicTimePackage,
|
||||||
MoreStringPackage
|
MoreStringPackage
|
||||||
{
|
{
|
||||||
lib.standard = true;
|
lib.standard = true;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#![cfg(not(feature = "no_std"))]
|
|
||||||
#![cfg(not(feature = "no_time"))]
|
#![cfg(not(feature = "no_time"))]
|
||||||
|
|
||||||
use super::arithmetic::make_err as make_arithmetic_err;
|
use super::arithmetic::make_err as make_arithmetic_err;
|
||||||
|
@ -156,7 +156,6 @@ impl<'de> Deserializer<'de> for DynamicDeserializer<'de> {
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(..) => self.deserialize_map(visitor),
|
Union::Map(..) => self.deserialize_map(visitor),
|
||||||
Union::FnPtr(..) => self.type_error(),
|
Union::FnPtr(..) => self.type_error(),
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(..) => self.type_error(),
|
Union::TimeStamp(..) => self.type_error(),
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ use std::prelude::v1::*;
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
use serde::ser::SerializeMap;
|
use serde::ser::SerializeMap;
|
||||||
|
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
use crate::types::dynamic::Variant;
|
use crate::types::dynamic::Variant;
|
||||||
|
|
||||||
@ -66,7 +65,6 @@ impl Serialize for Dynamic {
|
|||||||
map.end()
|
map.end()
|
||||||
}
|
}
|
||||||
Union::FnPtr(ref f, ..) => ser.serialize_str(f.fn_name()),
|
Union::FnPtr(ref f, ..) => ser.serialize_str(f.fn_name()),
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(ref x, ..) => ser.serialize_str(x.as_ref().type_name()),
|
Union::TimeStamp(ref x, ..) => ser.serialize_str(x.as_ref().type_name()),
|
||||||
|
|
||||||
|
@ -14,12 +14,10 @@ use std::{
|
|||||||
|
|
||||||
pub use super::Variant;
|
pub use super::Variant;
|
||||||
|
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
#[cfg(not(target_family = "wasm"))]
|
#[cfg(not(target_family = "wasm"))]
|
||||||
pub use std::time::Instant;
|
pub use std::time::Instant;
|
||||||
|
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
#[cfg(target_family = "wasm")]
|
#[cfg(target_family = "wasm")]
|
||||||
pub use instant::Instant;
|
pub use instant::Instant;
|
||||||
@ -86,7 +84,6 @@ pub enum Union {
|
|||||||
/// A function pointer.
|
/// A function pointer.
|
||||||
FnPtr(Box<FnPtr>, Tag, AccessMode),
|
FnPtr(Box<FnPtr>, Tag, AccessMode),
|
||||||
/// A timestamp value.
|
/// A timestamp value.
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
TimeStamp(Box<Instant>, Tag, AccessMode),
|
TimeStamp(Box<Instant>, Tag, AccessMode),
|
||||||
|
|
||||||
@ -197,7 +194,6 @@ impl Dynamic {
|
|||||||
Union::Array(_, tag, _) | Union::Blob(_, tag, _) => tag,
|
Union::Array(_, tag, _) | Union::Blob(_, tag, _) => tag,
|
||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(_, tag, _) => tag,
|
Union::Map(_, tag, _) => tag,
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(_, tag, _) => tag,
|
Union::TimeStamp(_, tag, _) => tag,
|
||||||
#[cfg(not(feature = "no_closure"))]
|
#[cfg(not(feature = "no_closure"))]
|
||||||
@ -223,7 +219,6 @@ impl Dynamic {
|
|||||||
Union::Array(_, ref mut tag, _) | Union::Blob(_, ref mut tag, _) => *tag = value,
|
Union::Array(_, ref mut tag, _) | Union::Blob(_, ref mut tag, _) => *tag = value,
|
||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(_, ref mut tag, _) => *tag = value,
|
Union::Map(_, ref mut tag, _) => *tag = value,
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(_, ref mut tag, _) => *tag = value,
|
Union::TimeStamp(_, ref mut tag, _) => *tag = value,
|
||||||
#[cfg(not(feature = "no_closure"))]
|
#[cfg(not(feature = "no_closure"))]
|
||||||
@ -296,7 +291,6 @@ impl Dynamic {
|
|||||||
if TypeId::of::<T>() == TypeId::of::<FnPtr>() {
|
if TypeId::of::<T>() == TypeId::of::<FnPtr>() {
|
||||||
return matches!(self.0, Union::FnPtr(..));
|
return matches!(self.0, Union::FnPtr(..));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
if TypeId::of::<T>() == TypeId::of::<crate::Instant>() {
|
if TypeId::of::<T>() == TypeId::of::<crate::Instant>() {
|
||||||
return matches!(self.0, Union::TimeStamp(..));
|
return matches!(self.0, Union::TimeStamp(..));
|
||||||
@ -329,7 +323,6 @@ impl Dynamic {
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(..) => TypeId::of::<crate::Map>(),
|
Union::Map(..) => TypeId::of::<crate::Map>(),
|
||||||
Union::FnPtr(..) => TypeId::of::<FnPtr>(),
|
Union::FnPtr(..) => TypeId::of::<FnPtr>(),
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(..) => TypeId::of::<Instant>(),
|
Union::TimeStamp(..) => TypeId::of::<Instant>(),
|
||||||
|
|
||||||
@ -364,7 +357,6 @@ impl Dynamic {
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(..) => "map",
|
Union::Map(..) => "map",
|
||||||
Union::FnPtr(..) => "Fn",
|
Union::FnPtr(..) => "Fn",
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(..) => "timestamp",
|
Union::TimeStamp(..) => "timestamp",
|
||||||
|
|
||||||
@ -415,7 +407,6 @@ impl Hash for Dynamic {
|
|||||||
|
|
||||||
Union::Variant(..) => unimplemented!("{} cannot be hashed", self.type_name()),
|
Union::Variant(..) => unimplemented!("{} cannot be hashed", self.type_name()),
|
||||||
|
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(..) => unimplemented!("{} cannot be hashed", self.type_name()),
|
Union::TimeStamp(..) => unimplemented!("{} cannot be hashed", self.type_name()),
|
||||||
}
|
}
|
||||||
@ -441,7 +432,6 @@ impl fmt::Display for Dynamic {
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(..) => fmt::Debug::fmt(self, f),
|
Union::Map(..) => fmt::Debug::fmt(self, f),
|
||||||
Union::FnPtr(ref v, ..) => fmt::Display::fmt(v, f),
|
Union::FnPtr(ref v, ..) => fmt::Display::fmt(v, f),
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(..) => f.write_str("<timestamp>"),
|
Union::TimeStamp(..) => f.write_str("<timestamp>"),
|
||||||
|
|
||||||
@ -547,7 +537,6 @@ impl fmt::Debug for Dynamic {
|
|||||||
fmt::Debug::fmt(v, f)
|
fmt::Debug::fmt(v, f)
|
||||||
}
|
}
|
||||||
Union::FnPtr(ref v, ..) => fmt::Debug::fmt(v, f),
|
Union::FnPtr(ref v, ..) => fmt::Debug::fmt(v, f),
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(..) => write!(f, "<timestamp>"),
|
Union::TimeStamp(..) => write!(f, "<timestamp>"),
|
||||||
|
|
||||||
@ -646,7 +635,6 @@ impl Clone for Dynamic {
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(ref v, tag, ..) => Self(Union::Map(v.clone(), tag, ReadWrite)),
|
Union::Map(ref v, tag, ..) => Self(Union::Map(v.clone(), tag, ReadWrite)),
|
||||||
Union::FnPtr(ref v, tag, ..) => Self(Union::FnPtr(v.clone(), tag, ReadWrite)),
|
Union::FnPtr(ref v, tag, ..) => Self(Union::FnPtr(v.clone(), tag, ReadWrite)),
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(ref v, tag, ..) => Self(Union::TimeStamp(v.clone(), tag, ReadWrite)),
|
Union::TimeStamp(ref v, tag, ..) => Self(Union::TimeStamp(v.clone(), tag, ReadWrite)),
|
||||||
|
|
||||||
@ -889,7 +877,6 @@ impl Dynamic {
|
|||||||
/// Create a new [`Dynamic`] from an [`Instant`].
|
/// Create a new [`Dynamic`] from an [`Instant`].
|
||||||
///
|
///
|
||||||
/// Not available under `no-std` or `no_time`.
|
/// Not available under `no-std` or `no_time`.
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
@ -917,7 +904,6 @@ impl Dynamic {
|
|||||||
Union::Array(.., access) | Union::Blob(.., access) => access,
|
Union::Array(.., access) | Union::Blob(.., access) => access,
|
||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(.., access) => access,
|
Union::Map(.., access) => access,
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(.., access) => access,
|
Union::TimeStamp(.., access) => access,
|
||||||
#[cfg(not(feature = "no_closure"))]
|
#[cfg(not(feature = "no_closure"))]
|
||||||
@ -955,7 +941,6 @@ impl Dynamic {
|
|||||||
v.set_access_mode(typ);
|
v.set_access_mode(typ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(.., ref mut access) => *access = typ,
|
Union::TimeStamp(.., ref mut access) => *access = typ,
|
||||||
#[cfg(not(feature = "no_closure"))]
|
#[cfg(not(feature = "no_closure"))]
|
||||||
@ -1090,7 +1075,6 @@ impl Dynamic {
|
|||||||
reify!(value, |v: crate::Map| return v.into());
|
reify!(value, |v: crate::Map| return v.into());
|
||||||
reify!(value, |v: FnPtr| return v.into());
|
reify!(value, |v: FnPtr| return v.into());
|
||||||
|
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
reify!(value, |v: Instant| return v.into());
|
reify!(value, |v: Instant| return v.into());
|
||||||
#[cfg(not(feature = "no_closure"))]
|
#[cfg(not(feature = "no_closure"))]
|
||||||
@ -1184,7 +1168,6 @@ impl Dynamic {
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Union::Map(v, ..) => reify!(*v => Option<T>),
|
Union::Map(v, ..) => reify!(*v => Option<T>),
|
||||||
Union::FnPtr(v, ..) => reify!(*v => Option<T>),
|
Union::FnPtr(v, ..) => reify!(*v => Option<T>),
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
Union::TimeStamp(v, ..) => reify!(*v => Option<T>),
|
Union::TimeStamp(v, ..) => reify!(*v => Option<T>),
|
||||||
Union::Unit(v, ..) => reify!(v => Option<T>),
|
Union::Unit(v, ..) => reify!(v => Option<T>),
|
||||||
@ -1484,7 +1467,6 @@ impl Dynamic {
|
|||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
if TypeId::of::<T>() == TypeId::of::<Instant>() {
|
if TypeId::of::<T>() == TypeId::of::<Instant>() {
|
||||||
return match self.0 {
|
return match self.0 {
|
||||||
@ -1583,7 +1565,6 @@ impl Dynamic {
|
|||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
if TypeId::of::<T>() == TypeId::of::<Instant>() {
|
if TypeId::of::<T>() == TypeId::of::<Instant>() {
|
||||||
return match self.0 {
|
return match self.0 {
|
||||||
@ -1978,7 +1959,6 @@ impl From<FnPtr> for Dynamic {
|
|||||||
Self(Union::FnPtr(value.into(), DEFAULT_TAG_VALUE, ReadWrite))
|
Self(Union::FnPtr(value.into(), DEFAULT_TAG_VALUE, ReadWrite))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
impl From<Instant> for Dynamic {
|
impl From<Instant> for Dynamic {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -14,7 +14,6 @@ pub mod variant;
|
|||||||
pub use bloom_filter::BloomFilterU64;
|
pub use bloom_filter::BloomFilterU64;
|
||||||
pub use custom_types::{CustomTypeInfo, CustomTypesCollection};
|
pub use custom_types::{CustomTypeInfo, CustomTypesCollection};
|
||||||
pub use dynamic::Dynamic;
|
pub use dynamic::Dynamic;
|
||||||
#[cfg(not(feature = "no_std"))]
|
|
||||||
#[cfg(not(feature = "no_time"))]
|
#[cfg(not(feature = "no_time"))]
|
||||||
pub use dynamic::Instant;
|
pub use dynamic::Instant;
|
||||||
pub use error::EvalAltResult;
|
pub use error::EvalAltResult;
|
||||||
|
Loading…
Reference in New Issue
Block a user