Fix no-std build.

This commit is contained in:
Stephen Chung 2022-03-28 12:53:49 +08:00
parent 6369fa5c65
commit 42b6796200
2 changed files with 1 additions and 9 deletions

View File

@ -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());

View File

@ -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;
}