diff --git a/src/any.rs b/src/any.rs index ec25a545..8795fbb9 100644 --- a/src/any.rs +++ b/src/any.rs @@ -25,7 +25,6 @@ use crate::stdlib::{ #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] -#[cfg(not(target_arch = "wasm64"))] use crate::stdlib::time::Instant; /// Trait to represent any type. @@ -195,7 +194,6 @@ impl Dynamic { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] Union::Variant(value) if value.is::() => "timestamp", Union::Variant(value) => (***value).type_name(), } @@ -220,7 +218,6 @@ impl fmt::Display for Dynamic { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] Union::Variant(value) if value.is::() => write!(f, ""), Union::Variant(_) => write!(f, "?"), } @@ -245,7 +242,6 @@ impl fmt::Debug for Dynamic { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] Union::Variant(value) if value.is::() => write!(f, ""), Union::Variant(_) => write!(f, ""), } diff --git a/src/api.rs b/src/api.rs index 1ff88316..ebfb699c 100644 --- a/src/api.rs +++ b/src/api.rs @@ -28,7 +28,6 @@ use crate::stdlib::{ #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] -#[cfg(not(target_arch = "wasm64"))] use crate::stdlib::{fs::File, io::prelude::*, path::PathBuf}; /// Engine public API @@ -556,7 +555,6 @@ impl Engine { /// Read the contents of a file into a string. #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] fn read_file(path: PathBuf) -> Result> { let mut f = File::open(path.clone()).map_err(|err| { Box::new(EvalAltResult::ErrorReadingScriptFile( @@ -601,7 +599,6 @@ impl Engine { /// ``` #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] pub fn compile_file(&self, path: PathBuf) -> Result> { self.compile_file_with_scope(&Scope::new(), path) } @@ -639,7 +636,6 @@ impl Engine { /// ``` #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] pub fn compile_file_with_scope( &self, scope: &Scope, @@ -782,7 +778,6 @@ impl Engine { /// ``` #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] pub fn eval_file(&self, path: PathBuf) -> Result> { Self::read_file(path).and_then(|contents| self.eval::(&contents)) } @@ -808,7 +803,6 @@ impl Engine { /// ``` #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] pub fn eval_file_with_scope( &self, scope: &mut Scope, @@ -1015,7 +1009,6 @@ impl Engine { /// Useful for when you don't need the result, but still need to keep track of possible errors. #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] pub fn consume_file(&self, path: PathBuf) -> Result<(), Box> { Self::read_file(path).and_then(|contents| self.consume(&contents)) } @@ -1024,7 +1017,6 @@ impl Engine { /// Useful for when you don't need the result, but still need to keep track of possible errors. #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] pub fn consume_file_with_scope( &self, scope: &mut Scope, diff --git a/src/engine.rs b/src/engine.rs index 21d055bd..625fb338 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -293,14 +293,8 @@ impl Default for Engine { #[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] module_resolver: Some(Box::new(resolvers::FileModuleResolver::new())), - #[cfg(any( - feature = "no_module", - feature = "no_std", - target_arch = "wasm32", - target_arch = "wasm64" - ))] + #[cfg(any(feature = "no_module", feature = "no_std", target_arch = "wasm32",))] module_resolver: None, type_names: HashMap::new(), @@ -381,7 +375,6 @@ fn extract_prop_from_setter(fn_name: &str) -> Option<&str> { fn default_print(s: &str) { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] println!("{}", s); } diff --git a/src/lib.rs b/src/lib.rs index f9c13150..aeb1470c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,6 @@ //! //! # #[cfg(not(feature = "no_std"))] //! # #[cfg(not(target_arch = "wasm32"))] -//! # #[cfg(not(target_arch = "wasm64"))] //! assert_eq!( //! // Evaluate the script, expects a 'bool' return //! engine.eval_file::("my_script.rhai".into())?, diff --git a/src/module.rs b/src/module.rs index 21bf1d11..8b022dcb 100644 --- a/src/module.rs +++ b/src/module.rs @@ -1055,7 +1055,6 @@ pub trait ModuleResolver: SendSync { pub mod resolvers { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] pub use super::file::FileModuleResolver; pub use super::stat::StaticModuleResolver; } @@ -1066,7 +1065,6 @@ pub mod resolvers {} #[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] -#[cfg(not(target_arch = "wasm64"))] mod file { use super::*; use crate::stdlib::path::PathBuf; diff --git a/src/packages/mod.rs b/src/packages/mod.rs index 6161cd38..d23b9428 100644 --- a/src/packages/mod.rs +++ b/src/packages/mod.rs @@ -34,7 +34,6 @@ pub use string_basic::BasicStringPackage; pub use string_more::MoreStringPackage; #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] -#[cfg(not(target_arch = "wasm64"))] pub use time_basic::BasicTimePackage; /// Trait that all packages must implement. diff --git a/src/packages/pkg_std.rs b/src/packages/pkg_std.rs index 80179f43..dbdeba28 100644 --- a/src/packages/pkg_std.rs +++ b/src/packages/pkg_std.rs @@ -7,7 +7,6 @@ use super::pkg_core::CorePackage; use super::string_more::MoreStringPackage; #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] -#[cfg(not(target_arch = "wasm64"))] use super::time_basic::BasicTimePackage; use crate::def_package; @@ -21,7 +20,6 @@ def_package!(crate:StandardPackage:"_Standard_ package containing all built-in f BasicMapPackage::init(lib); #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] BasicTimePackage::init(lib); MoreStringPackage::init(lib); }); diff --git a/src/packages/time_basic.rs b/src/packages/time_basic.rs index 098c417d..f5e094e0 100644 --- a/src/packages/time_basic.rs +++ b/src/packages/time_basic.rs @@ -1,5 +1,4 @@ #![cfg(not(target_arch = "wasm32"))] -#![cfg(not(target_arch = "wasm64"))] use super::logic::{eq, gt, gte, lt, lte, ne}; use super::math_basic::MAX_INT; diff --git a/src/result.rs b/src/result.rs index cfd96262..760a9a5e 100644 --- a/src/result.rs +++ b/src/result.rs @@ -14,7 +14,6 @@ use crate::stdlib::{ #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] -#[cfg(not(target_arch = "wasm64"))] use crate::stdlib::path::PathBuf; /// Evaluation result. @@ -32,7 +31,6 @@ pub enum EvalAltResult { /// Never appears under the `no_std` feature. #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] ErrorReadingScriptFile(PathBuf, Position, std::io::Error), /// Call to an unknown function. Wrapped value is the name of the function. @@ -106,8 +104,7 @@ impl EvalAltResult { match self { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] - Self::ErrorReadingScriptFile(_, _, _) => "Cannot read from script file", + Self::ErrorReadingScriptFile(_, _, _) => "Cannot read from script file", Self::ErrorParsing(p, _) => p.desc(), Self::ErrorInFunctionCall(_, _, _) => "Error in called function", @@ -167,7 +164,6 @@ impl fmt::Display for EvalAltResult { match self { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] Self::ErrorReadingScriptFile(path, _, err) => { write!(f, "{} '{}': {}", desc, path.display(), err)? } @@ -268,7 +264,6 @@ impl EvalAltResult { match self { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] Self::ErrorReadingScriptFile(_, pos, _) => *pos, Self::ErrorParsing(_, pos) @@ -308,7 +303,6 @@ impl EvalAltResult { match self { #[cfg(not(feature = "no_std"))] #[cfg(not(target_arch = "wasm32"))] - #[cfg(not(target_arch = "wasm64"))] Self::ErrorReadingScriptFile(_, pos, _) => *pos = new_position, Self::ErrorParsing(_, pos) diff --git a/tests/time.rs b/tests/time.rs index fd5a9182..9873decf 100644 --- a/tests/time.rs +++ b/tests/time.rs @@ -1,6 +1,5 @@ #![cfg(not(feature = "no_std"))] #![cfg(not(target_arch = "wasm32"))] -#![cfg(not(target_arch = "wasm64"))] use rhai::{Engine, EvalAltResult, INT};