From 42b67962009186663d0e5d6b562eb83c65a305ea Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 28 Mar 2022 12:53:49 +0800 Subject: [PATCH] Fix no-std build. --- src/engine.rs | 5 ----- src/packages/lang_core.rs | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/engine.rs b/src/engine.rs index 34218fda..76577c7d 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -242,11 +242,6 @@ impl Engine { } }); } - #[cfg(any(feature = "no_std", target_family = "wasm"))] - { - engine.print = None; - engine.debug = None; - } engine.register_global_module(StandardPackage::new().as_shared_module()); diff --git a/src/packages/lang_core.rs b/src/packages/lang_core.rs index 41d91c01..4126b5ae 100644 --- a/src/packages/lang_core.rs +++ b/src/packages/lang_core.rs @@ -5,9 +5,6 @@ use crate::{Dynamic, RhaiResultOf, ERR, INT}; #[cfg(feature = "no_std")] use std::prelude::v1::*; -#[cfg(not(feature = "no_float"))] -use crate::FLOAT; - def_package! { /// Package of core language features. pub LanguageCorePackage(lib) { @@ -84,7 +81,7 @@ mod core_functions { #[cfg(not(feature = "no_float"))] #[cfg(not(feature = "no_std"))] #[rhai_fn(name = "sleep")] - pub fn sleep_float(seconds: FLOAT) { + pub fn sleep_float(seconds: crate::FLOAT) { if seconds <= 0.0 { return; }