Use target_family for wasm.

This commit is contained in:
Stephen Chung
2022-01-12 08:12:28 +08:00
parent f0e9d4a557
commit 37dbc68bf5
18 changed files with 82 additions and 101 deletions

View File

@@ -7,11 +7,10 @@ use crate::{def_package, Dynamic, EvalAltResult, RhaiResult, RhaiResultOf, INT};
#[cfg(not(feature = "no_float"))]
use crate::FLOAT;
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_arch = "wasm64"))]
#[cfg(not(target_family = "wasm"))]
use std::time::{Duration, Instant};
#[cfg(any(target_arch = "wasm32", target_arch = "wasm64"))]
#[cfg(target_family = "wasm")]
use instant::{Duration, Instant};
def_package! {