From b696390c134b7d8289d4db280bf2c61e759015ff Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Thu, 14 Apr 2022 23:11:36 +0800 Subject: [PATCH] Fix no-std build. --- src/api/deprecated.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/deprecated.rs b/src/api/deprecated.rs index 1c911637..6d9d5463 100644 --- a/src/api/deprecated.rs +++ b/src/api/deprecated.rs @@ -4,10 +4,13 @@ use crate::{ Dynamic, Engine, EvalAltResult, Expression, FnPtr, ImmutableString, NativeCallContext, Position, RhaiResult, RhaiResultOf, Scope, AST, }; -use std::path::PathBuf; #[cfg(feature = "no_std")] use std::prelude::v1::*; +#[cfg(not(feature = "no_std"))] +#[cfg(not(target_family = "wasm"))] +use std::path::PathBuf; + impl Engine { /// Evaluate a file, but throw away the result and only return error (if any). /// Useful for when you don't need the result, but still need to keep track of possible errors. @@ -18,7 +21,7 @@ impl Engine { /// /// This method is deprecated. Use [`run_file`][Engine::run_file] instead. /// - /// This method will be removed in the next major version. + /// This method will be removed in the next majocd cr version. #[deprecated(since = "1.1.0", note = "use `run_file` instead")] #[cfg(not(feature = "no_std"))] #[cfg(not(target_family = "wasm"))]