From f7ad1cec3911ab9c9c047fc2305db41df5792eb0 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sat, 3 Apr 2021 11:49:16 +0800 Subject: [PATCH] Fix builds. --- src/bin/rhai-repl.rs | 6 ++---- tests/functions.rs | 1 + tests/string.rs | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/rhai-repl.rs b/src/bin/rhai-repl.rs index a51dc96f..3f556f05 100644 --- a/src/bin/rhai-repl.rs +++ b/src/bin/rhai-repl.rs @@ -1,6 +1,4 @@ -use rhai::{ - module_resolvers::FileModuleResolver, Dynamic, Engine, EvalAltResult, Module, Scope, AST, -}; +use rhai::{Dynamic, Engine, EvalAltResult, Module, Scope, AST}; use std::{ env, @@ -143,7 +141,7 @@ fn main() { // Set a file module resolver without caching #[cfg(not(feature = "no_module"))] { - let mut resolver = FileModuleResolver::new(); + let mut resolver = rhai::module_resolvers::FileModuleResolver::new(); resolver.enable_cache(false); engine.set_module_resolver(resolver); } diff --git a/tests/functions.rs b/tests/functions.rs index d74444ec..637e42eb 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -1,6 +1,7 @@ #![cfg(not(feature = "no_function"))] use rhai::{Engine, EvalAltResult, FnNamespace, Module, ParseErrorType, Shared, INT}; +#[cfg(not(feature = "sync"))] #[test] fn test_functions_trait_object() -> Result<(), Box> { trait TestTrait { diff --git a/tests/string.rs b/tests/string.rs index 236c5d12..92145239 100644 --- a/tests/string.rs +++ b/tests/string.rs @@ -222,6 +222,7 @@ fn test_string_substring() -> Result<(), Box> { Ok(()) } +#[cfg(not(feature = "no_object"))] #[test] fn test_string_format() -> Result<(), Box> { #[derive(Debug, Clone)]